How do I navigate to a particular anchor point in a page while passing a query string?
This doesn't work: <a href="index.php?page=videos&video=dread#video_2">
The div that contains the dread video look like this:
<div id="video2" class="video_container" name="video_2">
The div is way down the page so I don't want people to have to scroll all the way back down to the video container every time they choose a new video to watch.
Incidentally, is this why we have to scroll all the way back down the Facebook home/news feed every time we're done viewing somebody's link that they posted?
I wasn't sure which way it was - looks like I zigged when I should have zagged (:
<a href="targetPage.php?page=something&video=somethingElse#video2" />
<a href="targetPage.php#video2?page=something&video=somethingElse" />
where video2 is the id and not the name of the target element in targetPage.php
Remove the name attribute because it is not valid for div tags. Change id="video2" to id="video_2" and it will work. Kalon's suggestion is not right: the anchor point is always specified at the end of the URL regardless of the query string.