dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: 'checked' is null or not an object

  1. #1
    Join Date
    May 2008
    Posts
    19

    'checked' is null or not an object

    Hi
    This problem exists only in IE browser, in mozilla its working fine... i have to delete a row on click on checkbox....
    Here is my code :
    <table width="100&#37;" id="seller">
    <tr id="row_1" class="row">
    <td><input type="checkbox" name="delete" id="delete" value="1" /></td>
    </tr>
    <tr id="row_2" class="row">
    <td><input type="checkbox" name="delete" id="delete" value="2" /></td>
    </tr>
    </table>
    <input type="button" id="delete" name="delete" value="Delete" onclick="delete_row('seller')"/>
    ------------
    var delete_ids = [];
    function delete_row(tableID){
    var rows = document.getElementsByClassName('row');
    var delItems = document.getElementsByName('delete');

    for(var i=0;i < rows.length;i++){
    if(delItems[i].checked == true){
    delete_ids.push(rows[i].id);
    jQuery(rows[i]).remove();
    i = i-1;
    }
    }
    }

    Showin error on page : 'checked' is null or not an object
    can one please tell me the fix .

    thanks in advance,
    sri..
    Last edited by srinath48; 06-18-2010 at 09:20 AM.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654

  3. #3
    Join Date
    May 2008
    Posts
    19
    Hi Fang,
    Is there any workaround for this ...?


    thanks.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    The links give several functions that replicate getElementsByClassName

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles