Hi Bob,
This piece of code should solve ur problem.
//Called when chkSelectAll has been clicked.
function selectAll(thisForm) {
thisForm = document.<pagename>;
arrElements = thisForm.elements;
for(var i = 0; i < arrElements.length; i++) {
if( arrElements[i].type == 'CHECKBOX' || arrElements[i].type
== 'checkbox' ) {
arrElements[i].checked = thisForm.chkSelectAll.checked;
}
}
}
bye,
Prasad M
> -----Original Message-----
> From: Eovine, Bob [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 08, 1999 1:41 PM
> To: 'NetDynamics'
> Subject: [ND] JavaScript and CheckBoxes
>
> Has anyone successfully implemented the use of JavaScript on NetDynamics
> Checkboxes? I have a page where I want to have a "Check all" checkbox,
> and
> when the user checks the checkbox, I want all the row checkboxes to check.
> I have viewed the html and the checkboxes have the following naming
> strategy:
> myCheck
> myCheck[1]
> myCheck[2]
> myCheck[3] ...
>
> However, when I try to get each checkbox element in my form (called
> myForm),
> I get that the object is undefined.
> I am using document.myForm.myCheck[1].checked.
>
> I want to place this code in a for loop for all rows in the repeated, but
> it
> won't cooperate
>
> for(i = 0; i < NumRowsOnPage; i++)
> {
> sCheckBoxName = "document.myForm.myCheck[" + i + "]";
>
> bCheckValue = sCheckBoxName.checked;
> }
>
> I've also tried passing sCheckBoxName as a parameter to another method and
> then have that method get the value, but I was still unsuccessful.
>
> Any help would be greatly appreciated
> Thanks
> Bob Eovine
> General Cinema
> [EMAIL PROTECTED]
> _________________________________________________________________________
>
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]