File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Help needed with onChange()" Watch "Help needed with onChange()" New topic

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

Joined: Nov 08, 2001
Posts: 15385

Amber Vaidya
Ranch Hand

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

This seems to work fine.
Thanks a lot
I agree. Here's the link:
subject: Help needed with onChange()
It's not a secret anymore!