Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Call a function from ASP or HTML

Status
Not open for further replies.

claws2rip

Programmer
Dec 14, 2001
80
US
If I have a fucntion in vb script or java script, how can i call that function from inside ASP.

ex:

on page1 a user enters information and then clicks on "Save"
by clicking on "save", page2 in invoked .
In page2, which the user never sees I use ASP to call the Dll and then I want to call a script function that displays a msgbox to the user indicating whether the data has saved or not.

All i really need is how to call the script after the data is saved without having the user click on anything.

Sam
 
If you want to use a message box you can do the following:
Code:
<%
'Your ASP here
%>
<html>
<body onLoad=&quot;alert('Your data has been saved!');&quot;>
</body>
</html>

Message boxes are client-side only, you cannot directly invoke a messagebox from asp without sending at least minimal html. I don't really understand how the user &quot;never sees&quot; page 2, so I might be able to give better advice if you explain that a little better.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
sorry about the confusion, i should have tried to explain it better

i found out what i needed, here it is:

blnUpdateRecord=myObj.UpdateRecord(x, y, z)

if blnUpdateRecord=true then
%>
<script=javascript>
alert(&quot;Record has been saved&quot;)
</script>
<%
end if

Thank you for your help
sam

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top