[jQuery] Re: validation works in firefox but not in IE

2008-03-27 Thread Ariel

Interestingly, Aptana doesn't seem to think that there is a error
there either. I guess it's because of the fact that aptana is using
firefox 3 as the javascript engine. Is this no longer and error in the
new version of javascript included in firefox, or is it a bug in
firefox?

On Mar 25, 2:10 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Arielschrieb:> OK nevermind. after taking a break for a while and coming 
> back, i
> > immediately found the exra comma in there. although, in my defense,
> > neither firebug nor webdeveloper toolbar fond the syntax error either.
>
> I highly recommend a syntax-checking editor. Helps completely avoiding
> that mistake. Try Aptana or Komodo Edit.
>
> Jörn


[jQuery] Re: validation works in firefox but not in IE

2008-03-25 Thread Jörn Zaefferer


Ariel schrieb:

OK nevermind. after taking a break for a while and coming back, i
immediately found the exra comma in there. although, in my defense,
neither firebug nor webdeveloper toolbar fond the syntax error either.
  
I highly recommend a syntax-checking editor. Helps completely avoiding 
that mistake. Try Aptana or Komodo Edit.


Jörn


[jQuery] Re: validation works in firefox but not in IE

2008-03-24 Thread Ariel
OK nevermind. after taking a break for a while and coming back, i
immediately found the exra comma in there. although, in my defense,
neither firebug nor webdeveloper toolbar fond the syntax error either.

On Mar 23, 10:54 pm, Ariel <[EMAIL PROTECTED]> wrote:
> I have a form set up with the validator plugin (ver 1.2.1) and
> jquery(1.2.2) and the whole thing works perfectly in firefox 3b4, but
> when i fire up IE (any version) i get a alert box with the following
> message: "Error: Expected Identifier, string or number". when i hit
> debug IE throws me to the postalcode definition in the rules section,
> and i can't figure out what might be going on here.
>
> There is no other javascript on the page.
>
> Thank you,
>
> Ariel
>
> my code follows:
>
>         
>         
>         
>                 jQuery.validator.addMethod("phone", function(value, element) {
>                         return this.optional(element) || 
> value.match(/^\d{3}-\d{3}-
> \d{4}$/);
>                 }, "Must be XXX-XXX-");
>                 jQuery.validator.addMethod("zip", function(value, element) {
>                         return this.optional(element) || 
> value.match(/^((\d{5}-\d{4})|
> (\d{5})|([a-z]\d[a-z]\s?\d[a-z]\d))$/i);
>                 }, "US or Canadian postal code only");
>                 $().ready(function(){
>                         $("#leadForm").validate({
>                                 debug:true,
>                                 rules: {
>                                         firstname: "required",
>                                         lastname: "required",
>                                         phone: {
>                                                 required: true,
>                                                 phone: true,
>                                         },
>                                         postalcode: {
>                                                 required:true,
>                                                 zip: true
>                                         },
>                                         email: {
>                                                 required:true,
>                                                 email:true
>                                         }
>                                 },
>                                 messages: {
>                                         firstname: "required",
>                                         lastname: "required",
>                                         phone:{
>                                                 required: "required",
>                                                 phone: "XXX-XXX-"
>                                         },
>                                         postalcode:{
>                                                 required: "required",
>                                                 zip: "Zip, Zip+4, or Canadian"
>                                         },
>                                         email:{
>                                                 required: "required",
>                                                 email: "valid email required"
>                                         }
>                                 }
>                         })
>                 });
>         
> 
> #leadForm label.error{
>         color:#FF}
>
> 
>
>          id="leadForm">
>                 
>                         
>                                 First 
> Name: id="firstname" name="firstname" type="text" maxlength="20" />
>                         
>                         
>                                 Last 
> Name: id="lastname" name="lastname" type="text" maxlength="20" />
>                         
>                         
>                                  for="phone">Phone: name="phone" type="text" maxlength="20" />
>                         
>                         
>                                 Postal 
> Code: id="postalcode" name="postalcode" type="text" maxlength="10" />
>                         
>                         
>                                  for="email">Email: name="email" type="text"  maxlength="80" />
>                         
>                         
>                                 Best Time To 
> Call: td> value="1">MorningAfternoon value="3">Evening
>                         
>                         
>                                  value="Submit" name="submit" /> td>
>                         
>                 
>