I would like to add a top of page menu that follows the user down the page. When the user clicks on the "Top of Page" menu item it will take them back up to the top.
Very simple right? Well, my problem is that I want this script to run on every page. How do I specify the top of page in the .js file so that it will take me to top of whatever page the user is viewing without having to create a separate .js file for each page?
Thanks
Wendy
Dynamic Top of Page?
Have the top of link page be a # symbol. So the link would be url="#". The pound symbol, or hash symbol as its known, simply means to move to the top of the current page. Its used to have pages load at specific parts of the page, called an anchor, but thats another story. Just a # should work for any page.
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."
Thanks for your reply.
I tried what you suggested and the link doesn't go anywhere when I use "#". In fact I went to the sample pages where this # is also used and the link doesn't respond either. It just show a "#" in the URL bar at the bottom of my browser, but nothing happens. I'm using Explorer 6...any thoughts?
Thanks again.
Wendy
I tried what you suggested and the link doesn't go anywhere when I use "#". In fact I went to the sample pages where this # is also used and the link doesn't respond either. It just show a "#" in the URL bar at the bottom of my browser, but nothing happens. I'm using Explorer 6...any thoughts?
Thanks again.
Wendy
Wendy, yeah thanks to Ruth for mentioning that. Just so you know, you don't have to put an anchor in your paged called top for this to work, just anything after the # symbol will work. The reason is the browser will scroll to the top of the page if cannot find the anchor mentioned in your link. Best of luck.
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."