wingpeople
Programmer
I must be having a syntax problem. I want to redirect when the user clicks a button. I have a variable, MyRedirect, which has been assigned a value -- for this purpose, let's say:
MyRedirect = "MyOtherPage.asp?ID=135
I include this line to define my button:
<button type="button" name="btnChange" onClick="<%Response.Redirect(MyRedirect)%>">Change</button>
Problem is, as soon as this page loads, it redirects to MyOtherPage and never displays the original page or even gives the user a chance to click btnChange.
I've also tried this syntax:
<button type="button" name="btnChange" onClick="Response.Redirect(MyRedirect)">Change</button>
Now I get to see my page & click the button, but get an error 'Response is undefined'.
Help!
And one more thing (since I'm very new at this) -- if I DO get this to work using Response.Redirect, will this even work on browsers other than IE? I'm still not clear on the client/server model.
MyRedirect = "MyOtherPage.asp?ID=135
I include this line to define my button:
<button type="button" name="btnChange" onClick="<%Response.Redirect(MyRedirect)%>">Change</button>
Problem is, as soon as this page loads, it redirects to MyOtherPage and never displays the original page or even gives the user a chance to click btnChange.
I've also tried this syntax:
<button type="button" name="btnChange" onClick="Response.Redirect(MyRedirect)">Change</button>
Now I get to see my page & click the button, but get an error 'Response is undefined'.
Help!
And one more thing (since I'm very new at this) -- if I DO get this to work using Response.Redirect, will this even work on browsers other than IE? I'm still not clear on the client/server model.