Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • From: javascript@xxxxxxxxxx (Peter-Paul Koch)
  • Subject: [Javascript] https://lists.latech.edu/pipermail/javascript/2001-October/0023
  • Date: Fri, 28 Jun 2002 13:38:59 +0000

>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