Javascript Tips

Read these 3 Javascript Tips tips to make your life smarter, better, faster and wiser. Each tip is approved by our Editors and created by expert writers so great we call them Gurus. LifeTips is the place to go when you need to know about Html tips and hundreds of other topics.

Javascript Tips has been rated 3.1 out of 5 based on 196 ratings and 1 user reviews.
How do I create a "foward" link?

Forward to Next Page

Create a link on your site that functions as the forward button on the browser. Providing functional navigation will provide a more pleasant experience to your users, making them want to come back. This is also the companion to my "Back to previous page" tip.
Here's the code:
Example Link

Now, give it a try. (Note: you will have to go to another page and come back to this one for this function to work (Same as your browser)).

Example Link

   
How do I make a javascript text link to the previous page?

Back to previous page

Did you ever wonder how some webpages can have a text link that sends you to your last viewed page (even if it wasn't at thier site)? I did, so I found out. Now I'll share the secret:

<A HREF="javascript: history.go(-1)">Back</A>

You can even try it:

Back

   
How do I create a close window link with javascript?

Close window link

Opening a pop-up window to provide visitors with extra information or help adds credibility to a website. Visitors like the fact that they don't have to wait for an entire page to load (although they really are!) and they also don't have to lose their place on the page they're on.

A simple link on the page that opens in the pop-up will allow the user to close the window and return to the page they were viewing. Here's the code:

Close window

   
Not finding the advice and tips you need on this Html Tip Site? Request a Tip Now!


Guru Spotlight
Lynda Moultry