Page 1 of 1

WEb site need to stay there.

Posted: Sun Apr 11, 2010 1:00 am
by shajinvk
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

Re: WEb site need to stay there.

Posted: Sun Apr 11, 2010 10:26 pm
by solid
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:

Code: Select all

<a name="question1"></a>
Then have your php script redirect to the anchor that you are wanting, like this:

Code: Select all

header('Location: http://www.yourdomain.com/yourscript.php#question1');
exit;