I need to let the page loads at specific label within a page after user clicks the button Post.
Note: i’m using PHP
Form Code Sample:
<form action="po.php?id=44" method="POST">
<input type="hidden" name="here" value="#here" />
<input name="btn_send" type="submit" value="Post" />
</form>
The page should land somewhere in the page which has one title in between
as seen below
Code Sample:
<a name="here"></a>
<p>Total Number of Posts 55</p>
As you see, the place i land is a regular label text, not hyperlink. Therefore, i put the anchor line as an indicator just before the title.
Problem:
Page doesn’t land where i put (name=”here”). The page lands to the top. Is there easy way to make it land at ( name=”here”)?
Simply include the fragment in your form’s
actionattribute, egAlso, using ID attributes as fragment locations is much nicer. Lose the empty anchor and change your paragraph to…