PDA

View Full Version : select all script for checkbox


Marc
09-05-2002, 10:27 AM
Hi,
I'm quite new at this..and actually just into it..so I have a problem.

I tried to use the script (http://www.javascriptkit.com/script/script2/checkall.shtml) but it fails to work.
The difference is that I use more names of checkboxes in one form. So in this example I use except "v1", also V2, v3,v4,v5, etc.

Apparently it doesn't work then? Does anybody know how to fix this?

Much thanks appreciated,
Marc

phani
09-05-2002, 11:04 AM
u have to check individual checkbox by its name like

document.forms[0].checkbox1.checked=true
document.forms[0].checkbox2.checked=true
document.forms[0].checkbox3.checked=true
.....

Marc
09-05-2002, 11:26 AM
tx phani,
but as a nOOb I am I really don't know were to put this.....could you give me an example accoridng to the script I mentioned?

tx again,
Marc

adios
09-05-2002, 10:54 PM
Did you want to check all the c'boxes in the entire form - or just different groups of related ones? Both are easy.:)

Marc
09-10-2002, 04:13 PM
all buttons should be in the "select all", and they are all in one form.

umm
09-10-2002, 10:44 PM
Hi Adios,
I'm mucking around with multiple checkbox groups as the moment, with mixed success. I'd be interested to see any ideas on how to validate multiple checkbox groups