Sorted Table and Back Button

Discussion in 'HTML' started by scott_us, Jun 12, 2006.

  1. scott_us

    scott_us Guest

    I have a html web page with a table and sorting function in it. When
    users click one of the column header of the table, it will sort the
    table. Also there are some links in the table. People can click the
    links to go to a new page in the same window. The problem is that the
    window will never come back to the sorted status after a user hit the
    back button of the browser. It come back to a default status. That is,
    a unsorted table in my case.
    I would like to know if there is any solution? thanks.
     
    scott_us, Jun 12, 2006
    #1
    1. Advertising

  2. scott_us wrote:
    > I have a html web page with a table and sorting function in it. When
    > users click one of the column header of the table, it will sort the
    > table. Also there are some links in the table. People can click the
    > links to go to a new page in the same window. The problem is that the
    > window will never come back to the sorted status after a user hit the
    > back button of the browser. It come back to a default status. That is,
    > a unsorted table in my case.
    > I would like to know if there is any solution? thanks.
    >


    Depends on how your are rendering the page, and preserving the state.

    URL???

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jun 12, 2006
    #2
    1. Advertising

  3. scott_us

    scott_us Guest

    Jonathan,
    Thanks for your response. Indeed, the problem is very easy to
    duplicate. If you have a Yahoo email account, you will see that all
    your emails are sorted by Dates when you open the Email Inbox. You may
    sort them by clicking Sender, Subject,.... Suppose if you sorted all
    your email by Sender. Then open one of the emails which let you read
    its content. After you have done, you click the back button of your
    browerser. It will take you back to the mail index. But all mails are
    still sorted by Sender. However, I could not duplicate the feature in
    my website. I always get the index by Dates which is the first time a
    user opened.
    Please let me know if you have any idea to fix a java script file or
    html file to have this feature.
    Thanks.
    Scott
     
    scott_us, Jun 12, 2006
    #3
  4. scott_us wrote:
    > Jonathan,
    > Thanks for your response. Indeed, the problem is very easy to
    > duplicate. If you have a Yahoo email account,


    I don't.

    > you will see that all
    > your emails are sorted by Dates when you open the Email Inbox. You may
    > sort them by clicking Sender, Subject,.... Suppose if you sorted all
    > your email by Sender. Then open one of the emails which let you read
    > its content. After you have done, you click the back button of your
    > browerser. It will take you back to the mail index. But all mails are
    > still sorted by Sender. However, I could not duplicate the feature in
    > my website.


    When is asked, "URL????" That was a request for a url to your website so
    one can actually 'see' how you are trying to accomplish this.

    > I always get the index by Dates which is the first time a
    > user opened.
    > Please let me know if you have any idea to fix a java script file or
    > html file to have this feature.


    Well it would not (should not) be done client-side, so JavaScript will
    not be your answer but the CGI script (PHP, Perl, Python, whatever) you
    are using to create the page and populate the table. Methods would be
    via cookie, session or query string. It is how Yahoo does it and if you
    are not using server-side scripting that maybe where your problem lies.
    Of course if you would supply us a with URL we would know.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jun 12, 2006
    #4
  5. scott_us

    Neredbojias Guest

    To further the education of mankind, "scott_us" <>
    vouchsafed:

    > I have a html web page with a table and sorting function in it. When
    > users click one of the column header of the table, it will sort the
    > table. Also there are some links in the table. People can click the
    > links to go to a new page in the same window. The problem is that the
    > window will never come back to the sorted status after a user hit the
    > back button of the browser. It come back to a default status. That is,
    > a unsorted table in my case.
    > I would like to know if there is any solution? thanks.


    Yes, probably several. How are you sorting in the first place? If
    javascript, you can attach a hash string to the url. I've done this
    myself.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, Jun 13, 2006
    #5
  6. scott_us

    scott_us Guest

    Nerdboijas,
    Yes, I used a javascript to sort in the table. Please tell me more or
    give me some links to read. Thanks.
    Scott
    Neredbojias wrote:
    > To further the education of mankind, "scott_us" <>
    > vouchsafed:
    >
    > > I have a html web page with a table and sorting function in it. When
    > > users click one of the column header of the table, it will sort the
    > > table. Also there are some links in the table. People can click the
    > > links to go to a new page in the same window. The problem is that the
    > > window will never come back to the sorted status after a user hit the
    > > back button of the browser. It come back to a default status. That is,
    > > a unsorted table in my case.
    > > I would like to know if there is any solution? thanks.

    >
    > Yes, probably several. How are you sorting in the first place? If
    > javascript, you can attach a hash string to the url. I've done this
    > myself.
    >
    > --
    > Neredbojias
    > Infinity has its limits.
     
    scott_us, Jun 15, 2006
    #6
  7. scott_us

    Neredbojias Guest

    To further the education of mankind, "scott_us" <>
    vouchsafed:

    >> > I have a html web page with a table and sorting function in it. When
    >> > users click one of the column header of the table, it will sort the
    >> > table. Also there are some links in the table. People can click the
    >> > links to go to a new page in the same window. The problem is that the
    >> > window will never come back to the sorted status after a user hit the
    >> > back button of the browser. It come back to a default status. That is,
    >> > a unsorted table in my case.
    >> > I would like to know if there is any solution? thanks.

    >>
    >> Yes, probably several. How are you sorting in the first place? If
    >> javascript, you can attach a hash string to the url. I've done this
    >> myself.


    > Nerdboijas,
    > Yes, I used a javascript to sort in the table. Please tell me more or
    > give me some links to read. Thanks.
    > Scott


    I ided the items sorted, read and prepped them, then did a location.replace
    with the sorted order as a hash. The url looked something like this:

    www.example.com#a06a14a02a01a09....

    When the page first loads, it has to look for this hash-list and sort if it
    exists. It's a rather complicated procedure but will work.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, Jun 15, 2006
    #7
    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. sylvia sil
    Replies:
    1
    Views:
    633
    Curt_C [MVP]
    Dec 29, 2004
  2. Chicagoboy27

    image button as a back button

    Chicagoboy27, Oct 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,031
    Chicagoboy27
    Oct 30, 2006
  3. Sverker Nilsson
    Replies:
    2
    Views:
    588
    Gabriel Genellina
    May 25, 2008
  4. Author
    Replies:
    6
    Views:
    3,124
    George
    Jan 22, 2009
  5. Useful Info

    Firefox back button takes me back 2 pages.

    Useful Info, Jun 3, 2007, in forum: Javascript
    Replies:
    0
    Views:
    348
    Useful Info
    Jun 3, 2007
Loading...

Share This Page