natimage Posted October 28, 2003 Posted October 28, 2003 I'm using the below code to provide a handy alternative for returning to the previous page. It works fine in IE6, but doesn't do so well in Mozilla. For some reason I have to click my "Go Back" link twice to get it to go back. Any ideas out there as to why? ><td height="68" colspan="2" align="left" valign="top"> <a href="#" onClick="history.go(-1);return true;" class="highlightText">Go Back!</a></td> Thanks Quote
TCH-JimE Posted October 28, 2003 Posted October 28, 2003 (edited) Tracy, Try this: ><a href="JavaScript:history.go(-1);">Go Back</a> Jim Edited October 28, 2003 by Jimuni Quote
btrfld Posted October 28, 2003 Posted October 28, 2003 I'm having a similar problem with Mozilla Firebird. Slightly different. My detail page has a 'back' link (I've used both methods detailed above), and it works fine the first time. One click. If I go again to a detail page, either the same or a different one, the 'back' link fails, and continues to fail until I exit and restart the browser. I'm thinking this may be a bug in Firebird, but I thought I'd see if anybody has a better idea. Thanks in advance for any thoughts. Jim Quote
TCH-JimE Posted October 28, 2003 Posted October 28, 2003 It does indeed sound a bug. Its a cheats way using javascript but its a good short cut Jim Quote
btrfld Posted October 28, 2003 Posted October 28, 2003 Its a cheats way using javascript but its a good short cut If using Javascript is a 'cheats way', what do you suggest as a better way? I know I could put a specific link to the previous page, but that would take the user back to the top of the page. By using a back link I send them back to the previous page at the place they left from. Quote
borfast Posted October 28, 2003 Posted October 28, 2003 (edited) If using Javascript is a 'cheats way', what do you suggest as a better way? Jim, I'd suggest you don't put anything at all. Every browser has a "back" button, so why waste your visitors' bandwidth and your account space with something everyone already has? Edited October 28, 2003 by borfast Quote
btrfld Posted October 28, 2003 Posted October 28, 2003 Fair comment. Thanks. I'll see if the client agrees. Quote
TCH-JimE Posted October 28, 2003 Posted October 28, 2003 Another reason being that javascript can be turned off, and it also fails the recommedations layed out by W3C Jim Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.