tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wallace" <paul.wall...@mustang-technologies.com>
Subject var retrieval from checkbox (with single name)
Date Wed, 24 Apr 2002 09:21:42 GMT
Hi,
    I wish to retrieve / store values of multiple checkboxes checked in the
previous page. The problem here is I dont know how many boxes (a dynamic
amount of them is output), and the checkboxes must have the same name. I
wish to do something similar to Hotmail where I check an amount of
checkboxes, then manipulate the values in the next page. The reason they all
must be name the same - chkboxarray - is to allow a Hotmail style
'check-all', 'uncheck all' facility (below).
    The reason for this being that the check boxes checked contain email
recipient ID's (JSP) where I am concatonating email address as a String
value to add to a BCC field. I have tried retrieving and storing in an array
but all I get is the value for the first checkbox.
    Any ideas how I can achieve what I'm trying to do while retrieveing the
values with a single checkbox name, or maybe there's someone with a better
solution out there?! Perhaps I need to assign the checkboxes different
names, and edit the JS? (I dont know how to do this)!

Thanks for all input

Paul.

<script language= "JavaScript">
function modify_boxes(to_be_checked,total_boxes){
for ( i=0 ; i < total_boxes ; i++ ) {
    if (to_be_checked) {
        document.forms[0].chkboxarray[i].checked=true;
      }
else {
    document.forms[0].chkboxarray[i].checked=false;
    }
}
}
</script>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message