This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Help needed with onChange() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Help needed with onChange()" Watch "Help needed with onChange()" New topic
Author

Help needed with onChange()

Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
I have a check box and a multi-select list on a page.
On checking the check box, all the values in the multi-select list should be shown selected.
When the user explicitly selects one/more values in the multi-select list the checkbox should be shown unchecked.
Now, I have an onChange() event on the multi-select list. I am retrieving some values from the DB depending on the selections
made in the list.
Everything works fine if I explicitly select the values in the select list. If I click on the checkbox, the values in the list are
shown selected but the onChange event does not fire.

Following is a sample code of what I am trying to do. Any help will be greatly appreciated.
Thanks in advance

NOTE : OnClick has been changed to onClik for posting

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6


Eric
Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
I think you meant


This seems to work fine.
Thanks a lot
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Help needed with onChange()
 
Similar Threads
Need Help to disable a check box.
Getting the value of the select box in a textbox
Having trouble with javascript ...
list......jsp, javascript
Drop Downs