Amezis 0 Report post Posted March 1, 2005 What's the code I use on a link to go back to previous page? Share this post Link to post Share on other sites
bjrn 0 Report post Posted March 1, 2005 Either one of those should work: <a href="#" onClick="history.back()">Back</a><a href="#" onClick="history.go(-1)">Back</a> Share this post Link to post Share on other sites
Mike 0 Report post Posted March 2, 2005 Hey uh.. bjrn, is that JavaScript? Also, what's up with that a href='#' thing? I mean, why is it '#' and not just ''? Sorry Amezis, I don't mean to take over your topic. >_> Share this post Link to post Share on other sites
Hamtaro 0 Report post Posted March 2, 2005 There's another way to do that, but it's still the same thing: <a href="javascript:history.back(1);">Back</a><a href="javascript:history.go(-1);">Back</a> That one just doesn't use the # in the code. I think JavaScript is the only way to do that (Correct me if I'm wrong). If I made a mistake, please let me know, as I don't normally use this code. Share this post Link to post Share on other sites
Amezis 0 Report post Posted March 3, 2005 Thanks alot! I'll try the code Share this post Link to post Share on other sites
alexia 0 Report post Posted March 5, 2005 wooow is that jokeEvery browers has nexk nad preview page buttoni think its old scriptand its jsp script but i think you can make easy link next and back in every pages woow if you had 10000 page its really funyou can find jsp code that automatic insert next and back pages on your page Share this post Link to post Share on other sites
Amezis 0 Report post Posted March 10, 2005 I know that, lol, but some people are too dumb to click on the back button... And on my 'error'-pages (like 403,404 etc), I use a link with 'back'... Share this post Link to post Share on other sites
cse-icons 0 Report post Posted March 10, 2005 It has nothing to do with JSP. It is plain java script.yeah, true that u can use the back button. but in certain cases, you need to go back on certain event on the page.. it can be used then. Also giving a link to previous and next pages is desired sometimes(previous just for good gui design) . for next you need to go back to server, but for the previous a simple javascript wud do, since it is available right there....Cheers Share this post Link to post Share on other sites