|
-
Jan 25th, 2008, 06:08 PM
#1
Thread Starter
Addicted Member
[RESOLVED] fragment identifier
Is it possible to get the fragment identifier from the current URL in PHP?
For example,
http://server/page.php?query#fragident
Changes are not permanent, but change is. {Neil Peart}
-
Jan 25th, 2008, 10:58 PM
#2
Re: fragment identifier
No. The fragment is for client use only; it is not transmitted to the server.
-
Jan 28th, 2008, 10:17 AM
#3
Thread Starter
Addicted Member
Re: fragment identifier
Is there another way to have the client jump to a section in a long web document?
Changes are not permanent, but change is. {Neil Peart}
-
Jan 28th, 2008, 11:46 AM
#4
Re: fragment identifier
You could use a backgroundf JS request when the link is clicked. But why would you want to do this?
-
Jan 28th, 2008, 12:13 PM
#5
Thread Starter
Addicted Member
Re: fragment identifier
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?"
Changes are not permanent, but change is. {Neil Peart}
-
Jan 29th, 2008, 12:53 AM
#6
Re: fragment identifier
 Originally Posted by kzatu
Is there another way to have the client jump to a section in a long web document?
Thats what the fragment is for...
-
Jan 29th, 2008, 11:21 AM
#7
Thread Starter
Addicted Member
Re: fragment identifier
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?
Changes are not permanent, but change is. {Neil Peart}
-
Jan 29th, 2008, 11:26 AM
#8
Re: fragment identifier
Nothing that fancy. That link simply redirects to a URL containing a fragment part.
-
Jan 29th, 2008, 11:31 AM
#9
Thread Starter
Addicted Member
Re: fragment identifier
Hmm, that is a great idea! I think I can use that to my advantage. Simple, but clever.
Changes are not permanent, but change is. {Neil Peart}
-
Jan 29th, 2008, 04:52 PM
#10
Re: fragment identifier
 Originally Posted by kzatu
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?"
What would you want to know what the fragment part is - as it has nothing to do with the server side. :P
-
Jan 29th, 2008, 05:02 PM
#11
Thread Starter
Addicted Member
Re: [RESOLVED] fragment identifier
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?
Changes are not permanent, but change is. {Neil Peart}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|