Jump to content

Page Jump

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
Ok, so I made my first PHP contact for with sanitation and such (:D) The only problem is that it's half way down my page and when the user doesn't submit the correct information on submit it refreshes the page but doesn't jump back down to the contact form. Can I do something in PHP that will make the page load back up to the form or should I use some kind of javascript to bring it back to the bottom of the page?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
You can create an anchor, i.e. <a name="contactform"></a> and present them with the url fragment "url.php#contactform" to force their browser to go to it.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
oh cool that worked! I thought for sure it would mess with the PHP.

Thanks!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users