[Javascript] Javascript and FF
Troy III Ajnej
trojani2000 at hotmail.com
Tue Sep 1 17:21:23 CDT 2009
Hello Del,
> In the past I assumed that the statement in line 189
> function process_form(calculator)
> did declare/define calculator.
No, in fact it never did!
That's an internal local function argument/variable.
> I found the same error and am confused.
> calculator is the name of the form.
So it is a a name/id of a html element you are referring there!
Therefore, you were accessing that element directly by id/name.
> If that is no longer valid, what is? Where do I find such information?
Lots of declarations instructions and values throughout the script
are depending on that element. So, missing that element will cause
a general failure.
Therefore declaring:
var calculator = document.getElementById('calculator');
(anywhere in your script)
May just bring it all back on gear. Cause there's no other 'true' error
there.
Regards.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Troy III
progressive art enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: del at delweg.com
> To: javascript at lists.evolt.org
> Date: Sun, 30 Aug 2009 07:46:51 -0500
> Subject: Re: [Javascript] Javascript and FF
>
>
> ----- Original Message -----
> From: "Troy III Ajnej" <trojani2000 at hotmail.com>
>
> >
> > The javascript error is at line 424,
> > if (calculator.measurement_units[k].checked == true)
> > The report says: "calculator" is not defined.
> >
> >
> >
> > I never found any references to "calculator" - what is it? Is it an
> > element?
>
>
> Hi Troy;
> I found the same error and am confused.
> calculator is the name of the form.
> In the past I assumed that the statement in line 189
> function process_form(calculator)
> did declare/define calculator.
> This function is called when the "estimate" button is clicked on the form so
> it has been executed before line 424..
>
> If that is no longer valid, what is? Where do I find such information?
> Thanks.
> Del
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery
More information about the Javascript
mailing list