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

redirecting question

Status
Not open for further replies.

eurob

Programmer
Jan 25, 2004
13
US
I have a function and after it is done it needs to direct to test.asp, I tried to use response.redirect, but the problem is that when you load the page, it right away redirects eventhough i put the statement within the function.

Thanx

<form name=&quot;a&quot; onSubmit=&quot;bla()&quot;>

<script>
Function bla()

msgbox(&quot;hello&quot;)
' this does not work : <%response.redirect &quot;test.asp&quot;%>

End Function

</script
 
And what about this ?
Code:
document.location=&quot;test.asp&quot;

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I tried that but
now the strangest thing happens, nothing...
It executes the command, and I see in the status bar that the it is trying to open the page, but nothing happens.

any idea ?


<form name=&quot;a&quot; onSubmit=&quot;bla()&quot;>
<input type=&quot;submit&quot; &quot;value=&quot;submit&quot;>
</form>

<script language=&quot;VBscript&quot;>
Function bla()

msgbox(&quot;hello&quot;)
document.location=&quot;test.asp&quot;

End Function

</script
 
I found it, I just use the action property of the form element.


<form name=&quot;a&quot; onSubmit=&quot;bla()&quot;>
<input type=&quot;submit&quot; &quot;value=&quot;submit&quot;>
</form>

<script language=&quot;VBscript&quot;>
Function bla()

msgbox(&quot;hello&quot;)
document.a.action=&quot;test.asp&quot;
document.a.submit()

End Function

</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top