Page 1 of 1

jump to anchor after POST

Posted: Wed Aug 03, 2005 8:10 pm
by jhilden
I have a large page with many submit buttons that POST to PHP_SELF. After a user clicks one of the submit buttons I want the page to scroll/jump to the submit button they pushed.

Before each button I have

Code: Select all

<a name='$Counter'></a>
How can I make the page jump/scroll without the user having to click one of these:

Code: Select all

<a href='#$Counter'>
???

Thanks in advance for the help.
Cheers

Posted: Wed Aug 03, 2005 8:18 pm
by feyd
change the URL they submit to so that it includes the hash you want them to jump to.

Posted: Thu Aug 04, 2005 12:28 am
by jhilden
That's an elegent solution, here's my new code that does exactly what I want it to:

Code: Select all

<a name='$Counter'></a>			
			  <form action='get_pic.php#$Counter' method='post'>