History Object - Javascript

MrJiggyHill used Ask the Experts™
Hello all,

Bare with me, i'm in the process of learning Javascript.  This is probably very simple, but I can't seem to make it work....  My question is, if I create a form utilizing the history object:

<form name="historyForm">
<input type="button" value="Forward" onClick="history.forward();">
<input type="button" value="Back" onClick="history.back();">

When the user clicks on either back or foward, how can I display the number of pages stored in the history and make it update everytime we move to a new page?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

history.length gives the number of elements stored in the history.


Thank you very much!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial