[jQuery] Re: Serious bug in JQuery

2008-12-23 Thread kayode81un...@gmail.com

I figured it out.  I was using the validation framework and
erroneously tried to add validation rules to a  instead of an
.  Stepping through the code, I saw that it was asking for the
element.form, and the spans don't have that property defined.
Thanks

On Dec 22, 6:33 pm, donb  wrote:
> I would guess you've passed a parameter to a function, but done so
> incorrectly.  For example  writing xyz(bar) when you should have
> written .xyz( {foo: bar} )
>
> On Dec 22, 5:25 pm, "Andy Matthews"  wrote:
>
> > Care to share some code? Have you done your debugging to determine what line
> > of your code is causing the error from jQuery? Have you posted this bug to
> > the jquery bug mailing list?
>
> > andy
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > Behalf Of kayode81un...@gmail.com
> > Sent: Monday, December 22, 2008 4:18 PM
> > To: jQuery (English)
> > Subject: [jQuery] Serious bug in JQuery
>
> > I have a page that when loaded, it gets a javascript error.  It occurs in
> > jquery-1.2.6.js on line 662 on this line:
> >  var id = elem[ expando ];
> > It says elem is undefined.  This occurs in IE and FF.  This only occurs on
> > this specific page.  It is an aspx page.  Thanks


[jQuery] Serious bug in JQuery

2008-12-22 Thread kayode81un...@gmail.com

I have a page that when loaded, it gets a javascript error.  It occurs
in jquery-1.2.6.js on line 662 on this line:
 var id = elem[ expando ];
It says elem is undefined.  This occurs in IE and FF.  This only
occurs on this specific page.  It is an aspx page.  Thanks


[jQuery] Jquery Validation always not showing correct error message

2008-12-17 Thread kayode81un...@gmail.com

My Jquery validator refuses to show the correct error message but
rather the default error message every time the validation fails.
I am doing 3 things.
First
$.validator.addMethod("regexValidator0", function(value) {
return /^\(?\b([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]
{4})\b$/.test(value);
}, "Invalid");

I add a method to the validator.
Next I call the Validate method
 $("#aspnetForm").validate({
errorLabelContainer: $("div.error")
});

Next I add a rule
$('#myelement).rules('add', {regexValidator0:true,messages:
{regexValidator0:'Please enter a valid phone number'}});

Now when my rule doesn't pass validation, I don't get the error
message I specified in my rule, but rather the default message
"Invalid" when I added the rule.
Am I doing something wrong here, or is this a bug?

Thanks