[Javascript] Need Checkbox help.

Peter Brunone peter at brunone.com
Tue Aug 21 14:18:58 CDT 2001


Michael,

    It would be helpful to see the output, i.e. what the ASP code is
generating as the name of the checkbox.  This could very well be your
problem.
    Additionally, you might have more than one checkbox of the same name;
this would create a similar problem.

-Peter

----- Original Message -----
From: "Quale, Michael" <QualeM at americanimaging.net>
To: <javascript at LaTech.edu>
Sent: Tuesday, August 21, 2001 1:35 PM
Subject: [Javascript] Need Checkbox help.


| I'm creating a dynamic list of check boxes based on the form selected.
|
| I have parent checkboxes which can have multiple child checkboxes.
|
| If a user selects a child I need to (onchange) check the parent checkbox.
|
| I'm tried many combinations of the code below but keep getting
| "document.precert_request_form5.pBox not an object" errors.
|
| **********
| <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
| <!--
| function selectParent(cBox,pBox)
| {
| if(cBox.checked == true) {
| document.precert_request_form5.pBox.checked = true;
| }
| }
|
| //-->
| </SCRIPT>
| *********
|
| 'Dynamically built parent checkbox
| <input type=checkbox id="<%=rs("item_id")%>" name="<%=rs("item_id")%>"
| value="<%=rs("item_id")%>">
|
| 'Dynamically built child checkbox
| <input type=checkbox id="<%=rs("item_id")%>" name="<%=rs("item_id")%>"
| value="<%=rs("item_id")%>" LANGUAGE=javascript
| onclick="selectParent(this,<%=rsDisplayAll("parent_id")%>)">
|
| Any help is good help!
|
| Thanks,
|
| Mike Q.




More information about the Javascript mailing list