Username:
Password:
Enter your Keywords to
Search the Tips Archives


Search By Date:



    Join the List
    Bravenet Home










Webmaster Tips and Tricks
Newsletter Archives


Refresh Pages
May 7th, 2001

Javascript adds a lot of dynamics to your website. It has many uses for both the beginner and advanced programmer. What we are going to show you is a cool way to refresh your current page, or send your visitors to a new one!

<A HREF="index.html" onClick="alert('Reload this page?')">Click here</A>

Now if this code was on index.html and the person clicked the link, they would get a refreshed copy of the page. But if they were on page4.html and clicked the link, they would go to index.html. You can use the code anywhere. Just don't forget to change the Alert text!

Have some fun with this code, it can be used for much more than just one purpose.
Build your very first live Database Driven Website using PHP & MySQL. Instantly apply working code examples from the book to your Website. Get it Now! 295 pages.
Write faster loading, dramatically smaller pages. ‘Now You Too Can Easily Create Modern 'Table-free' Websites Using CSS from scratch’. Get it Now! 480 pages.
All contents copyright 1997-2003 Bravenet Web Services Inc.