Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    35
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question Checkbox not triggering onchange event

    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
    Vikram

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    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.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •