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

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
author & internet detective

Joined: May 26, 2003
Posts: 33106

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 98
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.

I agree. Here's the link:
subject: drop down list changed
It's not a secret anymore!