History Object - Javascript

MrJiggyHill
MrJiggyHill used Ask the Experts™
on
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();">
</form>

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?
Comment
Watch Question

Do more with

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

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

Author

Commented:
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