S
ShaneFowlkes
Somethinng odd is happening. I have a form button and on page load, I add a
javascript "back" function to this button. Like so:
btnCancel.Attributes.Add("onclick", "javascript:window.history.go(-1);")
<asp:Button ID="btnCancel" runat="server" Text="Cancel and go back." />
This generates the following html when rendered:
<input type="submit" name="btnCancel" value="Cancel and go back."
onclick="javascript:window.history.go(-1);" id="btnCancel" />
Yet, it doesn't work in IE6 or FF 1.5. Nothing happens. The page just
seems to post to itself. I've also tried changing the history.go value
to -2 and still get the same effect.
Any ideas? I'm using asp.net 2 (vb)
Thanks
javascript "back" function to this button. Like so:
btnCancel.Attributes.Add("onclick", "javascript:window.history.go(-1);")
<asp:Button ID="btnCancel" runat="server" Text="Cancel and go back." />
This generates the following html when rendered:
<input type="submit" name="btnCancel" value="Cancel and go back."
onclick="javascript:window.history.go(-1);" id="btnCancel" />
Yet, it doesn't work in IE6 or FF 1.5. Nothing happens. The page just
seems to post to itself. I've also tried changing the history.go value
to -2 and still get the same effect.
Any ideas? I'm using asp.net 2 (vb)
Thanks