P
Paul
Hi all,
This will hopefully be a really simple question....
I'm a newbie at web app development, and am teaching my self as I go. I have
a page that requires a user to click a
button which then pops up a message box asking the user to make a choice.
Based on this choice, it will either redirect to another page or display a
message. I can get it to display a message, but when it tries to redirect I
get the error;
"Error: Object doesn't support this property or method: 'document.redirect'"
I have tried researching this error but cannot find a solution that works,
can anyone help?
The page code is as follows;
<form>
<INPUT TYPE="BUTTON" NAME="button_2" VALUE="Click Here!">
<SCRIPT LANGUAGE="VBScript" >
Sub button_2_onclick
answer=MsgBox ("Call Sheet", vbYesNoCancel, "Click Yes to create a call
sheet")
If answer = "6" then
document.write("answer = ")&answer
Else If answer = "7" Then
document.redirect="test2.html"
Else if answer = "2" then
exit sub
End If
End If
End If
End Sub
</SCRIPT>
</form>
Many thanks in advance
Paul
This will hopefully be a really simple question....
I'm a newbie at web app development, and am teaching my self as I go. I have
a page that requires a user to click a
button which then pops up a message box asking the user to make a choice.
Based on this choice, it will either redirect to another page or display a
message. I can get it to display a message, but when it tries to redirect I
get the error;
"Error: Object doesn't support this property or method: 'document.redirect'"
I have tried researching this error but cannot find a solution that works,
can anyone help?
The page code is as follows;
<form>
<INPUT TYPE="BUTTON" NAME="button_2" VALUE="Click Here!">
<SCRIPT LANGUAGE="VBScript" >
Sub button_2_onclick
answer=MsgBox ("Call Sheet", vbYesNoCancel, "Click Yes to create a call
sheet")
If answer = "6" then
document.write("answer = ")&answer
Else If answer = "7" Then
document.redirect="test2.html"
Else if answer = "2" then
exit sub
End If
End If
End If
End Sub
</SCRIPT>
</form>
Many thanks in advance
Paul