[Javascript] just Checking Checkboxes

Peter Brunone peter at brunone.com
Thu Oct 11 16:31:09 CDT 2001


    Can't you just set the .checked property to true?

    whatever.style.visibility = 'hidden' might work for form elements in IE,
but I doubt you can do it in NS at all.

----- Original Message -----
From: "Bill Marriott" <bill.marriott at optusnet.com.au>
To: <javascript at LaTech.edu>
Sent: Thursday, October 11, 2001 4:10 PM
Subject: [Javascript] just Checking Checkboxes


| Hi Everyone,
|
| Today's problem for me is:
|
| How in Javascript can I 'Check' a checkbox box when I add it as an element
| in code?
| The code below will add it to the new row but I want to check it as well
and
| if possible make it invisible
|
| Bill.
|
|
| var addObj = document.createElement("INPUT");  ////// a add check box
| addObj.type = "checkbox";
| addObj.name = "ADDLINK";
| addObj.id = "A1";
| var addObjParent = newRowObj.lastChild.previousSibling;
| addObjParent.appendChild(addObj);
|
|
|
| _______________________________________________
| Javascript mailing list
| Javascript at LaTech.edu
| http://www.LaTech.edu/mailman/listinfo/javascript
|




More information about the Javascript mailing list