View Full Version : Checkbox not triggering onchange event

01-13-2009, 06:44 AM
Hello all,

I am creating an HTML page where I am displaying a number of records in a database in a table. Now each row contains a checkbox. The onchange event of this checkbox triggers a function which changes the background color of the row.
I also created a checkbox in the header row, which checks/unchecks all the check boxes in the table.

My problem is when I click this "Check all" checkbox, the onchange event defined for the checkboxes is not being triggered. Why is that happening?
Any insight on this will be very helpful.

Thanks and Regards

01-13-2009, 08:10 AM
Check the methods available for a checkbox object http://www.w3schools.com/HTMLDOM/dom_obj_checkbox.asp
You'd need to use the onclick event for attribute for your case.