PDA

View Full Version : Dynamic Ajax Content + Persistence is Needed



majocmatt
05-19-2009, 08:32 PM
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.

majocmatt
05-21-2009, 06:00 PM
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.

molendijk
05-21-2009, 10:12 PM
The script you're referring to doesn't do its job correctly in a number of cases, see here (http://www.dynamicdrive.com/forums/showthread.php?p=197099#post197099), where some alternatives are proposed.
===
Arie Molendijk.

majocmatt
05-28-2009, 03:18 PM
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.

molendijk
05-28-2009, 05:20 PM
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.