This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes AJAX, DOM, and history Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAX, DOM, and history" Watch "AJAX, DOM, and history" New topic

AJAX, DOM, and history

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
I have a series of AJAX calls on my page that populate some dropdowns. If the user selects some of the values in these dropdowns and proceeds to next page via submitting the form everything passes fine. I want to be able to allow the user to go back (using back button) and still see the values he/she selected and have the values still display in the dropdowns as before. How can I accomplish this? The AJAX calls populate dropdowns and the user chooses from these fields it looks like returning to the page using a back button erases or doesn't seem to recall data generated this way. Is there a way to return to a page with AJAX calls that populated dropdowns and still have the items that were chosen still show up? Thanks in advance for any info.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Cookies my friend, cookies. They are good with a glass of milk and they are good with remembering states of things as long as the user has them enabled.

I agree. Here's the link:
subject: AJAX, DOM, and history
Similar Threads
Populating HTML select using JSON
How to solve back button problem in Ajax
Adding new values in Session
How to add a select dynamically and populate it with values from database
Ajax passing nulls to a JSP page using POST