G
Guest
Looking to do something pretty simple... I have a cancel button on my page.
When the user clicks it, i want to verify they want to cancel and if so,
redirect them.
Code:
-------------------------------------------------------------
<html>
<script language=vbscript>
if MsgBox("Testing",4) = 6 Then
window.location = "http://www.google.com"
End if
</script>
</html>
--------------------------------------------------------------
This code works just fine like that, but when I place it in a sub procedure
and call it in response to an onclick event, the redirect never happens. I
even placed an alert box in the if block ot verify that I was getting into
the block. I got the alert, but no redirect. Why doesn't this work in
repsonse to an onclick event, but it deos work by itself in a separate page?
Thanks.
Jerry
When the user clicks it, i want to verify they want to cancel and if so,
redirect them.
Code:
-------------------------------------------------------------
<html>
<script language=vbscript>
if MsgBox("Testing",4) = 6 Then
window.location = "http://www.google.com"
End if
</script>
</html>
--------------------------------------------------------------
This code works just fine like that, but when I place it in a sub procedure
and call it in response to an onclick event, the redirect never happens. I
even placed an alert box in the if block ot verify that I was getting into
the block. I got the alert, but no redirect. Why doesn't this work in
repsonse to an onclick event, but it deos work by itself in a separate page?
Thanks.
Jerry