Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic content disappears on back  RSS feed

 
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a select list that when chosen from passes a value to an AJAX script that looks up other values. These additional values are then put into another select list. The user then chooses a value from this dropdown and submits the page. If the user uses the browser's back button (IE) the dynamically populated select list has no values. How can I preserve the values in this select list?
 
Author and ninkuma
Marshal
Posts: 66727
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. You'll need to recreate it on page load. This is one of the reasons JavaScript MVC frameworks are becoming essential for creating dynamic web apps.
 
Don't listen to Steve. Just read this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!