List Info

Thread: Re: checkboxes and variables




Re: checkboxes and variables
country flaguser name
Sweden
2007-03-28 02:23:03


> Re: checkboxes and variables
> Posted by: "Bocah Sableng" cahsableng%40gmail.com">cahsablenggmail.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.

__._,_.___
.

__,_._,___
Re: Re: checkboxes and variables
country flaguser name
United States
1969-12-31 18:00:00

On 3/28/07, Jon Stephens < jon%40hiveminds.net">jonhiveminds.net> wrote:

> > check the attribute 'checked' of each checkbox before add its value.
&gt; > document.form.base1 works on IE only,
&gt;
> Assuming that you actually meant "document.form1.base1";, this is simply
&gt; not true.
&gt;

Thanks for your comment, but I still don't know the meaning of "this
is simply not true". Can you explain more?

I hope you have something to say to fix my coding habit. I need
suggestion from 10-year veteran.

> > for compatibility, use:
>; > document.forms['form1'].elements['base1']
> > code below tested on FF1.5 and IE6.
>;
> [...]
&gt;

Yeah, I know those browsers are both ancient. But my computer I work
with is relatively slow.
I can't understand your "braces-and-three-dots&quot; means. Maybe you have
any idea how to test javascript codes?

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )