Is it possible to get the fragment identifier from the current URL in PHP?
For example,
http://server/page.php?query#fragident
Printable View
Is it possible to get the fragment identifier from the current URL in PHP?
For example,
http://server/page.php?query#fragident
No. The fragment is for client use only; it is not transmitted to the server.
Is there another way to have the client jump to a section in a long web document?
You could use a backgroundf JS request when the link is clicked. But why would you want to do this?
I'm having a difficult time answering your question, because I can see so many reasons to do this. So I must retort with a, "why not?"
Thats what the fragment is for...Quote:
Originally Posted by kzatu
Well let's take this forum for example. Through subscription reminders, I'll get an email with a link like this one, http://www.vbforums.com/showthread.p...6&goto=newpost. There is no fragment identifier in that link, but yet the forum somehow jumps you to the newest post.
Might VBForums be using something like backgroundf JS request like VisualAd recommended?
Nothing that fancy. That link simply redirects to a URL containing a fragment part.
Hmm, that is a great idea! I think I can use that to my advantage. Simple, but clever.
What would you want to know what the fragment part is - as it has nothing to do with the server side. :PQuote:
Originally Posted by kzatu
What I want to do is give a visual cue to the user. When they are redirected to another page that uses a fragment identifier, I want the section they are being redirected to to have a different background color so that they can easily track (with their eyes), where the fragment identifer meant to take them.
Although the frament identifier always tries to put the specified section at the top of the window, it is not always possible.
What I plan to do is pass a session variable along with the frament identifier to the redirection link. This way I can have my cake and eat it too.
Make sense?