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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to call a javascript function

Status
Not open for further replies.

drew10

Programmer
Feb 26, 2002
123
US
I have a javascript function that closes a popup window. I have asp code that inserts a record to a db. After the insert is finished, I just want to call the javascript function. How do I call it within asp code? There is no event such as onClick or onSubmit.
Thanks,
drew10
 
I think you can write in the middle of the ASP Page a javascript function

<%
response.write &quot;1&quot;
response.write &quot;2&quot;
<script language=&quot;Javascript&quot;>
function test() {
alert('OK')
}
response.write &quot;3&quot;
response.write &quot;4&quot;
%>

regards,
durug

 
Just a little modification, and it'll work fine
<%
response.write &quot;1&quot;
response.write &quot;2&quot;

<script language=&quot;Javascript&quot;>
function test() {
alert('OK')
}

test();
</script>

response.write &quot;3&quot;
response.write &quot;4&quot;
%>
 
Thank you trollacious and durug. Your posts were extremely helpful.
-drew10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top