I kno nobody will understand what i wrote on the subject field.. my requirement is,,,
consider my website is used for writing online exam,, and after the question is answereed the page must be in a center position .. and if we click next,after the page reloads the page starts from top.. i want to stay position of the page before refresh..
if u dont understand,and need to help me,,feel free to contact me @ shajinvk@gmail.com
WEb site need to stay there.
Moderator: General Moderators
Re: WEb site need to stay there.
It sounds like you should really be using AJAX. But a quick and dirty way of handling this would simply be to place anchors at each question like this:
Then have your php script redirect to the anchor that you are wanting, like this:
Code: Select all
<a name="question1"></a>Code: Select all
header('Location: http://www.yourdomain.com/yourscript.php#question1');
exit;