www.webdeveloper.com
Results 1 to 2 of 2

Thread: [JavaScript]Help needed in CheckBox Usage?

  1. #1
    Join Date
    Aug 2010
    Posts
    1

    [JavaScript]Help needed in CheckBox Usage?

    Hi All

    I'm having few check boxes which enables/disables respective textboxes.
    In order to check all checkboxes in one go i wrote a script which does so, invoking this on a button click.
    This is checking all the check boxes, but this is not enabling textboxes.
    I want all text boxes enabled,

    Can anyone help me in this regard?

    Help is appreciated.

    Thanks
    Manoranjan

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    Without seeing your code, I'm not sure how you are disabling your textboxes. But you can enable readonly textboxes with something like this.

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    >
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    title></title>
    <
    script type="text/javascript">
    <!--

    window.onload=function() {
      
    document.getElementById("txtIn").readOnly false;
    }

    //-->
    </script>

    </head>
    <body>
     
    <div>
      <input id="txtIn" type="text" name="txtIn" readonly="readonly" />
    </div>
     
    </body>
    </html> 

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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