PDA

View Full Version : onClick not working


florida
05-07-2003, 11:07 AM
I have an input button that works great in Netscape 4 where it moves me back a page BUT in IE 5.5 it doesnt work. Please advise what Iam doing wrong with this input part?

<INPUT type="submit" value="Back" onclick="javascript:history.back()">

x_goose_x
05-07-2003, 12:11 PM
onclick="history.back();"

florida
05-07-2003, 12:49 PM
thanks now how would I get it to go to top of page??


Will this work?
onclick="history.top.back();"

x_goose_x
05-07-2003, 01:02 PM
Don't think that you can scroll to the top when you go back.

arnyinc
05-07-2003, 01:25 PM
Although I can't picture why you would want to scroll the user to another location than where they left off, you could have an onload event that bring the user to the top of the page EVERY time the page loads. I'm not sure if this would cause any other problems, but it would solve this problem.

<body onload="location.href='#top'">
<a name="top"></a>