Getting fragment from URL

Discussion in 'ASP General' started by michael@diverge.com, Sep 29, 2007.

  1. Guest

    I have a series of pages I want to put a link on that will allow them
    to go back to the page they entered from (the referring URL). The
    problem is that to return to the previous page correctly I need the
    fragment (page.asp#fragment) along with the referring url. Problem is
    that ASP does not seem to provide that. Any advice on how to get the
    fragment along with the URL?

    For those who might suggest doing a javascript back()... this will not
    work since the area people are going into can be a group of pages and
    they may click around a few times before wanting to return, so I was
    going to save the referring URL when the enter.

    Thanks
     
    , Sep 29, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed writing in
    news::

    > I have a series of pages I want to put a link on that will allow them
    > to go back to the page they entered from (the referring URL). The
    > problem is that to return to the previous page correctly I need the
    > fragment (page.asp#fragment) along with the referring url. Problem is
    > that ASP does not seem to provide that. Any advice on how to get the
    > fragment along with the URL?
    >
    > For those who might suggest doing a javascript back()... this will not
    > work since the area people are going into can be a group of pages and
    > they may click around a few times before wanting to return, so I was
    > going to save the referring URL when the enter.
    >
    > Thanks
    >


    The fragment is client side and ASP has no way of accessing it. If the
    page in question has a lot of information you could do something like:

    <ul>
    <li><a href="#part1">Part 1</a><li>
    <li><a href="#part2">Part 2</a></li>
    <li><a href="#part3">Part 3</a></li>
    </ul>

    <h2 id="part1">Title</h2>
    <p>....</p>
    <h2 id="part2">Title</h2>
    <p>...</p>
    <h2 id="part3">Title</h2>
    <p>...</p>

    Most users know how to use the back button (unless you broke it opening
    a new window), and also know how to use the page down key, scroll or
    otherwise get around the page.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Sep 29, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    861
  2. Andrew Thompson

    fragment and query part of URL in applet?

    Andrew Thompson, Dec 7, 2003, in forum: Java
    Replies:
    2
    Views:
    743
    Andrew Thompson
    Dec 7, 2003
  3. Christian Roth

    URL-encode fragment identifier?

    Christian Roth, May 25, 2004, in forum: XML
    Replies:
    0
    Views:
    998
    Christian Roth
    May 25, 2004
  4. Roman O

    Url.Fragment property is empty

    Roman O, May 10, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    552
  5. Amishera Amishera

    why getting error for this code fragment

    Amishera Amishera, Mar 31, 2010, in forum: Ruby
    Replies:
    3
    Views:
    109
    Brian Candler
    Mar 31, 2010
Loading...

Share This Page