Results 1 to 5 of 5

Thread: Dynamic Ajax Content + Persistence is Needed

  1. #1
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic Ajax Content + Persistence is Needed

    1) Script Title: Dynamic Ajax Content

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/ajaxcontent.htm

    3) Describe problem:

    I use the drop down style of this script (the select drop down menu) and love it. However, the way I use it is almost like a menu, and I need it to retain the same results if a user clicks on some other link and then hits the back button to where this script is located.

    Can this script be adapted to use persistence? If so, how?

    Thank you for your time.

  2. #2
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I really don't know much JS, so if someone could advise me as to what my options are that'd be great. I notice other DD scripts have this persistence feature, and I really just want to know if this one I'm using can be adapted relatively easily?

    Thanks again.

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    The script you're referring to doesn't do its job correctly in a number of cases, see here, where some alternatives are proposed.
    ===
    Arie Molendijk.

  4. #4
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh alright, that makes sense.

    Well, is there a way to make the darn select menu go back to default when you hit the back button? This would actually fix my problem too. I just don't want to confuse the user, since when he changes the content via the dropdown menu and clicks on a link.. when he hits the back button he is returned to the default content, but the button it still showing his selection.

    And I use the dropdown without a submit button, so it reacts like a jump menu, so he cannot simply hit enter again.

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    I'm not sure I completely understand what you mean, but if you want a selectbox to go to its default state, then, in this case, you can do things like <body onunload="document.getElementById('ajaxmenu').selectedIndex=0"> or <a onclick="document.getElementById('ajaxmenu').selectedIndex=0">back to default</a> etc.
    ===
    Arie Molendijk.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •