Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking for Existing Forward History

Status
Not open for further replies.

jl8789

MIS
May 22, 2003
293
US
How can I display a message if the forward-history exists?

Basically, I am going to be coming into the page using the back button, and if the forward history exists I want to display a message.

Thanks!
 
Code:
if (history.next)
{
  // forward button is enabled
}
else
{
  // is disabled
}

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakesperean sonnet.
 

AFAIK, history.next is not a valid property. The only valid property is history.length, which does not show you where abouts in the history you are.

Dan
 
According to DevGuru, this works in Netscape-based browsers.

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakesperean sonnet.
 

Aaah gotcha... I was using MSDN, which lists IE-only (pretty much)... So I guess it's one of those non-standard things which cannot be relied on to be cross-browser.

Dan
 
history.next does not work in the IE browser. So, there isn't a way to check if say the history.length > where we currently are in history?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top