Is a top of page anchor link within the menu possible?

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Is a top of page anchor link within the menu possible?

Post by Ruth »

Is there a way to put an anchor link within the menu that just goes to the top of whichever page on which the menu is being utilized? I tried using #, that does nothing, so then I tried using that with target=_top, that actually ends up being a regular link back to the index page on the site. I don't know how to write code but after reading a bunch of things on here and elsewhere I was wondering if it would be an onclick code of some kind or maybe a function....and I'd have no idea how to write it, something about function, onclick go to the top of the page? Then put it in the link place to run when it's clicked. I think that's how those work.... :?

Ruth
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok i figured this one out...when you put the # sign in there by itself, I am guessing andy's code see's it as you are trying to make that link do nothing, so he does not insert any type of hyperlink. You'll notice the cursor doesn't even turn into a hand when you mouse over such links. Instead of the "#", put in something like "#top". That will make it scroll to the top of the page. You don't have to have any anchor in the page called 'top' because if the browser cant find an anchor, it stays at the top. If you have a spot in the page you would rather the menu move the page to, then put an anchor there and reference that. But what I mentioned should make it scroll to the top all the time. Best of luck! ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Thanks Dave... I actually wrote a whole long thing about it not working and then when I got it up for you to test, I tested it and it works....whooo hooo. Thanks sooo much. :D

Ruth
Post Reply