HOME  |    TRAINING  |   FREE TUTORIALS   |   JOBS
Find out more about our new RSS feed.
FREE Tutorial
THE FAMOUS JAVASCRIPT BACK PAGE ROUTINE

CATEGORY
SEARCH OUR OTHER TUTORIALS

DESCRIPTION

Navigation is a key element on your website, but what do you do when you want to give the user the option of going back to the previous page? In comes Javascript!
Click here to be kept informed of our new Tutorials.


This is a very short article to show you a simple and well known technique of giving the visitor the option of returning to the previous page he or she has come from. The method used is very straight forward to implement into your own website using a simple piece of javascript. Best of all it works with all browsers.

Let's take the following piece of HTML that might be in your webpage:

<a href="previouspage.htm">Click Here to go back 1 page</a>

This example above would place a link on your webpage asking the visitor to click on the link to go back to the page which they have just come from.

Now the only problem with this is if you don't know what page they have actually come from then you are totally stuck and you don't really know where to link them too. This can be resolved using the following replacement for the above example:

<a href="javascript:history.back( )">Go back to the previous page</a>

As you can see we have replaced the desired link to a piece of javascript which checks your history list in your browser, which actually knows where you have come from. Its really that simple.

So by including the above html exactly as show, it will give your visitors the option of viewing the previous page.




5 RELATED COURSES AVAILABLE
JAVASCRIPT PROGRAMMING
This training course aims to teach the reader the fundamentals of JavaScript. This course covers topics such as -....
HTML 4.0 INTRODUCTION
To create, format and publish a small website using HTML 4.0. You will learn to create web pages incorporating fo....
INTRODUCTION TO JAVA PROGRAMMING
The aims of this Java training courses is to understand the role that Java plays on the Internet; describe the be....
MICROSOFT VISUAL BASIC V6 INTRODUCTION
To go from the fundamentals of Visual Basic programming to the threshold of Advanced level. Gaining in depth prog....
MICROSOFT VISUAL BASIC 5.0 CLIENT SERVER DEVELOPMENT
This course teaches the skills required to develop client server applications using MS Visual Basic 5.0 Enterpris....
 
0 RELATED JOBS AVAILABLE
CONTACT US
Wednesday 23rd May 2012  © COPYRIGHT 2012 - website design by Website Design by Visualsoft