plinto Posted October 7, 2007 Share Posted October 7, 2007 Hi, I made a xhtml page with a form (with an anchor name "form") for sending mail at the bottom of the page . When the submit button is pressed it calls a send.php page that generates some code and recalls the form in it. The problem is this: is there some way to get the send.php page to open where the anchor is? example: pages.php#form Thanks Link to comment https://forums.phpfreaks.com/topic/72223-how-to-skip-to-an-ancor-in-the-page/ Share on other sites More sharing options...
Rithiur Posted October 7, 2007 Share Posted October 7, 2007 AFAIK, you can simply just use the "pages.php#form" as the action value for the form, like <form action="pages.php#form" id="form"> (when using fragments, you should rather refer to their ID attribute than name, since that behavior is deprecated) Link to comment https://forums.phpfreaks.com/topic/72223-how-to-skip-to-an-ancor-in-the-page/#findComment-364163 Share on other sites More sharing options...
plinto Posted October 8, 2007 Author Share Posted October 8, 2007 I tried what you said but it doesn't work anyway. If I look at the code it is correct: <form action="pages.php#form" id="form"> but in the address bar it comes out: pages.php# Why is this? Link to comment https://forums.phpfreaks.com/topic/72223-how-to-skip-to-an-ancor-in-the-page/#findComment-364773 Share on other sites More sharing options...
cooldude832 Posted October 8, 2007 Share Posted October 8, 2007 I do not believe the solution is just that simple, I think your solution needs to link to the second page like action="pages.php?location=form" and then use js to read that location and move the doc to that location. Link to comment https://forums.phpfreaks.com/topic/72223-how-to-skip-to-an-ancor-in-the-page/#findComment-364780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.