tabbed interface using ajax : bookmarks and back-button

Discussion in 'ASP .Net' started by John A Grandy, Mar 26, 2008.

  1. For a tabbed interface implemented with ajax ( tab contents located inside
    an UpdatePanel ) , a well-known problem is the inability to bookmark a
    specific tab and the inability to use the back button to return to tabs
    previously viewed.

    Does anyone have any ideas / solutions / alternate designs for this problem
    ?
     
    John A Grandy, Mar 26, 2008
    #1
    1. Advertising

  2. Hello John,

    Just change the url when u change the tabs, adding some id, like "mysite.com/tab?<number>"
    and when bookmark this page u need to parse the tab number and open it

    I'd use the ASP.NET MVC for this

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    JG> For a tabbed interface implemented with ajax ( tab contents located
    JG> inside an UpdatePanel ) , a well-known problem is the inability to
    JG> bookmark a specific tab and the inability to use the back button to
    JG> return to tabs previously viewed.
    JG>
    JG> Does anyone have any ideas / solutions / alternate designs for this
    JG> problem ?
    JG>
     
    Michael Nemtsev [MVP], Mar 26, 2008
    #2
    1. Advertising

  3. John A Grandy

    bruce barker Guest

    most ajax toolkits have a browser history control you use for this. MS is
    working on one (see futures). but writing you own is not hard.

    the standard way ajax pages write to history is to use the #bookmark feature
    of the browser. render bookmarks for each tab. after a tab is selected, in
    javascript, navigate to the bookmark for that tab. this will not postback,
    because the bookmark is on the page, but will the bookmark to the browser
    history.

    if the user saves the link, it will have the bookmark (say myurl.aspx#tab1).
    when you render the page, your code looks ate the bookmark to determine the
    state (which tab fixed).

    now all have to code for back button support. no real load is done (or you
    coudl just use the onload event). the simple way is to run a timer that
    checks if window.location.href has changed.

    if you google ajax history support you will find several toolkits for this,
    if you want to skip the fun of wrting one.


    -- bruce (sqlwork.com)


    "John A Grandy" wrote:

    > For a tabbed interface implemented with ajax ( tab contents located inside
    > an UpdatePanel ) , a well-known problem is the inability to bookmark a
    > specific tab and the inability to use the back button to return to tabs
    > previously viewed.
    >
    > Does anyone have any ideas / solutions / alternate designs for this problem
    > ?
    >
    >
    >
     
    bruce barker, Mar 26, 2008
    #3
    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. Mills
    Replies:
    0
    Views:
    4,603
    Mills
    Jun 14, 2004
  2. sylvia sil
    Replies:
    1
    Views:
    619
    Curt_C [MVP]
    Dec 29, 2004
  3. Lans Redmond
    Replies:
    2
    Views:
    644
    Lans Redmond
    Apr 10, 2005
  4. Peter Aitken

    Tabbed interface?

    Peter Aitken, Jul 21, 2004, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    149
    Scott G.
    Jul 22, 2004
  5. bizt
    Replies:
    0
    Views:
    88
Loading...

Share This Page