Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DHTML and 'back' button ?

 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would probably have to use cookies and fire an event of window.onload

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic