[Javascript] https://lists.latech.edu/pipermail/javascript/2001-October/0023

Peter-Paul Koch gassinaumasis at hotmail.com
Fri Jun 28 08:38:59 CDT 2002


>do you remember your posting below? did you finally find a solution?
>
>document.createElement("<INPUT type=checkbox checked");
>
>... works but it's not very nice ...

Does this work in NN6? I doubt it.

>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

>var addObj = document.createElement("INPUT");  ////// a add check box
>addObj.type = "checkbox";
>addObj.name = "ADDLINK";
>addObj.id = "A1";

Try:

addObj.checked = true;

>var addObjParent = newRowObj.lastChild.previousSibling;
>addObjParent.appendChild(addObj);

ppk

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the Javascript mailing list