Yes, that's correct.  It would probably help to know what it is that
those (apparently global) variables are, or rather where it is that
they come from (and, from curiosity, why the page would set things up
that way - global variables are as ugly in web pages as they are in
any other programming domain).


On Sat, Sep 12, 2009 at 10:47 AM, Rick Faircloth
<r...@whitestonemedia.com> wrote:
>
> Hmmm...that could explain the sudden error I just now received
> running that code that "city is not defined" and "state is not defined",
> etc.,
> when validation tries to run.
>
> I guess using "var" causes the variable to be local within that piece of
> code
> instead of applicable there and in other pieces of code that references
> those variables?
>
> Rick
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Mike McNally
> Sent: Saturday, September 12, 2009 9:12 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
> Well, putting "var" before the variables will probably make IE happy,
> but it also makes the function useless.
>
>
> On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
> <r...@whitestonemedia.com> wrote:
>> That did it…seems to satisfy IE that way, too.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>> Behalf Of Dhruva Sagar
>> Sent: Saturday, September 12, 2009 6:06 AM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Why would this code cause this error in IE?
>>
>>
>>
>> You should use the keyword 'var' before each variable.
>>
>> Thanks & Regards,
>> Dhruva Sagar.
>>
>>
>> Charles de Gaulle  - "The better I get to know men, the more I find myself
>> loving dogs."
>>
>> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth <r...@whitestonemedia.com>
>> wrote:
>>
>> Code:
>>
>>
>>
>>        $(document).ready(function() {
>>
>>
>>
>>               streetNumber         = 'valid';
>>
>>               streetName          = 'valid';
>>
>>               city                 = 'valid';
>>
>>               state                = 'valid';
>>
>>               bedrooms             = 'valid';
>>
>>               fullBaths            = 'valid';
>>
>>               rent                 = 'valid';
>>
>>               securityDeposit      = 'valid';
>>
>>
>>
>>        });
>>
>>
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

Reply via email to