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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifying Anchor tags within Javascript history hyperlink

Status
Not open for further replies.

HarryVincent

Programmer
Feb 22, 2005
4
US
I've built a form that gets to a certain point and allows the user to click links in order to return to previous pages and alter info if need be. I'm using history.back() to send them to the previous page, but I'd like for to further control where they end up on the previous page. I have defined anchor tags but I'm not sure how to call them properly.

My current code looks like this:
<a href="javascript:history.back()">

I'm thinking I need something along these lines (but this doesn't work):
<a name="#info" href="javascript:history.back()">
 
To do this with a normal URL, you would simply do:

mypage.htm#info

But due to permissions, you can't access the actual URL of the history object (although you could open it in a frame and get the link that way, although that would be slightly extravagant).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top