Use the remote method:
http://docs.jquery.com/Plugins/Validation/Methods/remote#url

Jörn

On Sat, Jul 4, 2009 at 6:30 PM, Manolet Gmail<mano...@gmail.com> wrote:
>
> Hi, im adding a method. i want to display a message like:
> THECONTENTOFMYINPUT is already user. this is what im doing.
>
>          jQuery.validator.addMethod("checkname", function(value, element) {
>                  var name = $('#PromotionName').val();
>                  var promotion_id = $('#PromotionId').val();
>
>                  text = $.ajax({ url:
> "/promotions/checkName/"+name+'/'+promotion_id, type:'post',
> async:false }).responseText;
>                  return eval(text);
>                }, jQuery.format("{0} is already used", 
> $('#PromotionName').val() ));
>
> but dont works
>

Reply via email to