iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (34)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

May 17, 2008
Learn HTML forms
About
 
May 16, 2008
Who Are Your Top Friends on Facebook?
About
 
May 15, 2008
Reader Question - Would you host your client's work on your website?
About
 
May 15, 2008
How to Create an Ajax Autocomplete Text Field: Part 6
WebReference.com
 
May 14, 2008
Poll: Are the browser safe colors still needed?
About
 
May 14, 2008
Google Doctype launched
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /JavaScript

"< Back" and "Next >" Buttons 

  Views:    9686
  Votes:    3
by John Doe 12/15/03 Rating: 

Synopsis:

This article will show how to make all those famous javascript buttons for back and next.
Pages: 
The Article

1. The "back" button
1.1. As a text
<a href="javascript:history.back(1);">Back</a>

1.2 As a submit button
<input type="button" onClick="
javascript:history.back(1);" value="Back">
the code:
javascript:history.back(1)
javascript: = define that we will use javascript for the next lines
history.back = define that we are using a history function, based on past sites
(1) = will back 1 site only.
1. The "next" button
1.1. As a text
<a href="javascript:history.go(1);">Next</a>

1.2 As a submit button
<input type="button" onClick="
javascript:history.go(1);" value="Next">
 
the code:
It's almost the same of back.

javascript:history.go(1)
 
javascript: = define that we will use javascript for the next lines
history.go = define that we are using a history function, based on first sites
(1) = will advance 1 site only.
 
 
Very simple no? Now you can make the navigation of your site more useful.
Pages: 



 
  Sponsors