View Full Version : Stop Page from Returning to Top with Links
Doujinshi Fanboi
09-22-2007, 06:11 AM
ok i help
how do u stop the page going to the top when i go into a another link?
can you find a way that when i go into another page it will not go up the top it will just stay in position.
if you show me the code then i'll appreicate a lot !!!!!! can please give me it as soon as possible
jscheuer1
09-22-2007, 09:15 AM
Where else would the page go? If you link to a new page, that new page should start at the top. If you are talking about an anchor link tag being used for a javascript action on a page without loading a new page, something like so:
<a href="#" onclick="doSomething();">Do Something</a>
Do it like this:
<a href="#" onclick="doSomething();return false;">Do Something</a>
But certain free hosts, like Geocities will sometimes still reload the page, then you can do this:
<span onclick="doSomething();">Do Something</span>
And, if you like, the span can be styled to look like a link:
<span onclick="doSomething();"
style="color:blue;cursor:pointer;text-decoration:underline;">Do Something</span>
That is actually the preferred method for doing javascript actions on a page anyway.
If you are talking about something else, please explain it better, and:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Doujinshi Fanboi
09-22-2007, 10:23 PM
ok here's an example http://mdobsession.simplykenix.net/v20main
jscheuer1
09-22-2007, 11:47 PM
ok here's an example http://mdobsession.simplykenix.net/v20main
That's a big page, what link(s) are you talking about? And, what would you like them to do that they are not currently doing?
If you are talking about something else, please explain it better . . .
My time here is limited, please do me the favor of focusing the question.
Doujinshi Fanboi
09-23-2007, 12:55 AM
oh sorri the example is my friends
ok if you see the navigation area those are the links. when i click on it the page dosen't go up the top it just in position so i want my site to be just like that.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.