my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes DHTML and 'back' button ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DHTML and Watch "DHTML and New topic
Author

DHTML and 'back' button ?

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Hi,

I'm using DHTML, but my page gets meesed up when clicking the "Back" button on the browser...

Example: say I have a 'select' control with a list of countries.
Whenever the selected country changes, I use DHTML to display the capitol of the selected country ( in some < span > in the page).

Full code:


This works fine, untill I navigate to another page, and then use "Back" to return to my page... when using 'back', the displayed capitol will always be 'London' regardless of the selected country...

Help would be appriciated.
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You would probably have to use cookies and fire an event of window.onload

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DHTML and 'back' button ?