12-29-2006, 05:07 PM
At my WebPages when I click at a button at the bottom of the page it takes my back automatically at the top of the page and some how I fell that it is annoying :eek:
the same thing when i click at any object at the center and an action should be taken the page when it reloads it takes me back at the top while it should take me to the center of the page where it took action :confused:
12-29-2006, 06:12 PM
<a name="middleAnchor"> and on the button you put
<a href="#middleAnchor" onclick="doOtherStuff()"><button .......></a>
12-29-2006, 06:15 PM
If using a link to perform an action, return false onclick.
<a href="#" onclick="myfunction();return false;">
If using a button, you should not be seeing this behavior unless you called it a submit button. If you don't want a server roundtrip, why submit the form at all?
You can use a regular button instead.
12-29-2006, 08:01 PM
If you do need to go back to the server, you may consider using AJAX or some similar technique where the call back to the server is transparent to the user (meaning I can hit a button and the program control goes back to the server without the current page being refreshed and putting the view back to the top of the page). Note that this AJAX technique is a little more advanced topic, but there are a few good tutorials out on the web...
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.