NAVIGATING TO A PREVIOUS BROWSER PAGE USING JAVASCRIPT - May 8th, 2011


If you have a situation where the usual previous/next buttons won't work, like where different list pages are using the
same detail page, Chris Waddell from Interactive Tools suggests that you try employing this simple JavaScript link to go
back to the previous page in the browser history.



<a class="your_class" href="javascript:history.go(-1)">Back</a>



To go back 2 pages in the browser history, you can change the number from -1 to -2, however it may not work in some
browsers, like IE8 where it will only go back one page regardless.

If anyone has a more universal solution, let me know and I'll update this recipe.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service