[Javascript] Need Checkbox help.

Quale, Michael QualeM at americanimaging.net
Tue Aug 21 14:19:42 CDT 2001


OK Here goes:

As for the checkboxes being named the same, I do not see this as a problem
because I'm using a unique item_id for each box.

Here is an example of what I get:

Parent:

<input type=checkbox id="118" name="118" value="118"> 

Child:

<input type=checkbox id="119" name="119" value="119" LANGUAGE=javascript
onclick="selectParent(this,118)">

Do you think this could be a character problem?

Numeric vs Char?

Thanks for your help.

Mike Q.


-----Original Message-----
From: Peter Brunone [mailto:peter at brunone.com]
Sent: Tuesday, August 21, 2001 2:19 PM
To: javascript at LaTech.edu
Subject: Re: [Javascript] Need Checkbox help.


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.

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list