> Re: checkboxes and variables
> Posted by: "Bocah Sableng" cahsableng%40gmail.com">cahsableng
gmail.com yoekriz
> Date: Mon Mar 26, 2007 2:17 pm ((PDT))
>
>> > function getbase() {
>> >
>> > var b1 = document.form1.base1.value;
>> > var b2 = document.form1.base2.value;
>> > var b3 = document.form1.base3.value;
>> >
>> > document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
>> > parseFloat(b3);
>> >
>> > }
>
> check the attribute 'checked' of each checkbox before add its value.
> document.form.base1 works on IE only,
Assuming that you actually meant "document.form1.base1", this is simply
not true.
> for compatibility, use:
> document.forms['form1'].elements['base1']
> code below tested on FF1.5 and IE6.
[...]
--
This message has not been scanned for viruses.
Since I do not use a Microsoft operating
system or software, and use only plaintext
for email, there is little need for me to do so.
.