wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes drop down list changed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "drop down list changed" Watch "drop down list changed" New topic
Author

drop down list changed

nastaran zanjnai
Ranch Hand

Joined: Apr 15, 2011
Posts: 43
in my application I need to check if a drop down list has changed or not. can you please let me know how I should write it?

if (document.form.dropdownlist.???)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

You could use the onchange event to find out when it changes. Or if you want to see if the value has changed since page load (at some later point), you could store the original value in a hidden field and compare it to the current value.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
hi
Changed from an initial value??? or Changed from an old or retrieved value? Try this and let me know if it is that you want:
Simply copy and paste in you html editor and run.

 
jQuery in Action, 2nd edition
 
subject: drop down list changed
 
Similar Threads
Reg : Drop-down box
need list of button
add or remove an item from drop down
Combo Box search as user types
Drop down list value