[jQuery] jquery validate plugin - greaterThan addmethod problem

2009-12-20 Thread markstegg...@googlemail.com
Hello,

So, I am using two custom methods, GreaterThan and LesserThan:

// custom code to for greater than
jQuery.validator.addMethod('greaterThan', function(value, element,
param) {
return ( value > jQuery(param).val() );
}, 'Must be greater than start' );

// custom code for lesser than
jQuery.validator.addMethod('lesserThan', function(value, element,
param) {
return ( value < jQuery(param).val() );
}, 'Must be less than end' );

Then, in the validation rules I have:

aupairLongStay: {required:true, greaterThan: "#aupairShortStay"},
aupairShortStay: {required:true, lesserThan: "#aupairLongStay"},


I'm trying to use them to test two select boxes against each other...
making sure one is less than the other but it doesn't work properly...
any ideas?


[jQuery] Re: jquery form plugin. IE doesnt work

2009-08-23 Thread markstegg...@googlemail.com

Thanks for the good advice. I downloaded the development version of
jquery 1.3.2.

IE script debugger is highlighting line 1897

return "submit" === elem.type;

Surely there is nothing wrong with this?

 



[jQuery] jquery form plugin. IE doesnt work

2009-08-22 Thread markstegg...@googlemail.com

Hello,

Im using ajaxForm to submit my contact form at futurekode.com:

$('#contactForm').ajaxForm(function(data) {}

--

This works fine in all browsers except IE7/8. IE error says theres a
problem with jquery 1.3.2 and highlights this line:

return"submit"===T.type


Could someone take a look at my contact form in IE and see if there is
a fix for this?

Thanks
Mark


[jQuery] Re: Jquery validation plugin question

2009-03-27 Thread markstegg...@googlemail.com

Thanks.

It gives me an error saying "element.attr is not a function"

What is wrong with this:

highlight: function(element, errorClass) {
 if (element.attr("name") == "aupairLanguageList")
$("#multiSelect-aupairLanguageList-title").addClass("error");
  },
  unhighlight: function(element, errorClass) {
 if (element.attr("name") == "aupairLanguageList")
$("#multiSelect-aupairLanguageList-title").removeClass
("error");
  }

On Mar 26, 12:03 pm, Jörn Zaefferer 
wrote:
> Use the highlight and unhighlight options for that.
>
> Jörn
>
> On Thu, Mar 26, 2009 at 3:21 PM, markstegg...@googlemail.com
>
>  wrote:
>
> > Hello,
>
> > Thanks for building this validation plugin, I like it. I have a
> > question:
>
> > The error class automatically gets added to the label with the same
> > for="" name, but for a certain error I need to change the element that
> > gains the "error" class.
>
> > For instance, I added this line to the error placement so that a
> > certain element receives the error class but then realised the error
> > class would not be removed when the error is corrected by the user:
>
> > 
> > else if (element.attr("name") == "aupairLanguageList") {
> >         error.insertAfter("#multiSelect-aupairLanguageList-content");
> >         $("#multiSelect-aupairLanguageList-title").addClass("error");
> >         }
> > 
>
> > Any Ideas?
>
> > Thanks


[jQuery] Jquery validation plugin question

2009-03-26 Thread markstegg...@googlemail.com

Hello,

Thanks for building this validation plugin, I like it. I have a
question:

The error class automatically gets added to the label with the same
for="" name, but for a certain error I need to change the element that
gains the "error" class.

For instance, I added this line to the error placement so that a
certain element receives the error class but then realised the error
class would not be removed when the error is corrected by the user:


else if (element.attr("name") == "aupairLanguageList") {
 error.insertAfter("#multiSelect-aupairLanguageList-content");
 $("#multiSelect-aupairLanguageList-title").addClass("error");
 }


Any Ideas?

Thanks