SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Checkbox.checked = false not working in Mozilla

    Hi all
    I'm having following code ,which is working fine in IE but now in Mozilla.
    Can anywone help me ?

    for (i=0; i<sel_EmpList.length; i++)
    {
    cb_name = 'cbu'+ arrEMPNO[sel_EmpList[i]];
    obj = document.getElementById(cb_name);

    if (obj.value != '')
    {
    obj.checked = false;
    }
    }

  2. #2
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The partial code you have posted isn't enough. There is only so much we can do if we cannot discern the context in which you are running your script. post the entire code.

  3. #3
    SitePoint Member
    Join Date
    May 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Got the problem.

    Quote Originally Posted by Kailash Badu View Post
    The partial code you have posted isn't enough. There is only so much we can do if we cannot discern the context in which you are running your script. post the entire code.
    Thanks for your reply , but i found the problem.
    Mozilla needs id for every element ;but for IE ,name is enough.
    I declared ids for all the checkboxes ,& the code is working now.


Bookmarks

Posting Permissions

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