Results 1 to 11 of 11

Thread: [RESOLVED] fragment identifier

  1. #1

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Resolved [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}

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: fragment identifier

    No. The fragment is for client use only; it is not transmitted to the server.

  3. #3

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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}

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: fragment identifier

    You could use a backgroundf JS request when the link is clicked. But why would you want to do this?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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}

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: fragment identifier

    Quote 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...

  7. #7

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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}

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: fragment identifier

    Nothing that fancy. That link simply redirects to a URL containing a fragment part.

  9. #9

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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}

  10. #10
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: fragment identifier

    Quote 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
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  11. #11

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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
  •  



Click Here to Expand Forum to Full Width