Hmm, i'm not really sure how to pull that off.  I would look into the
showErrors option or possibly the Valid function.

http://docs.jquery.com/Plugins/Validation/validate

http://docs.jquery.com/Plugins/Validation/valid

Good luck and let us know how things turn out for ya!


On Nov 18, 3:47 pm, "Atkinson, Sarah" <sarah.atkin...@cookmedical.com>
wrote:
> I want the function to trigger when there are errors  it's to alter the 
> position of both the errors and other elements on the page.
>
> So I got the function to fire but I can't seem to changes the css on the 
> error boxes.
>         $('label .error').css({'left' : basePossitionOffset.left});
> Does not work.
>
> I should be able to alter the error messages just like anyother element in 
> the DOM right?
>
> On 11/18/09 3:34 PM, "StephenJacob" <turnstylecreat...@gmail.com> wrote:
>
> It depends on your method of validation. Here is the form/validation
> system I use for my contact form. Hope this helps!
>
> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
> <script type="text/javascript" src="js/jquery.validate.js"></script>
> <script type="text/javascript" src="js/jquery.form.js"></script>
> <script type="text/javascript">
>
> $(document).ready(function() {
>
>         $("#contactForm").validate({
>                 rules: {
>                         fullname: {
>                                 required: true,
>                                 minlength: 2
>                         },
>                         email: {
>                                 required: true,
>                                 email: true
>                         },
>                         company: {
>                                 required: true,
>                                 minlength: 2
>                         },
>                         phone: {
>                                 required: true,
>                                 minlength: 2
>                         },
>                 },
>                 messages: {
>                         fullname: '<span class="error">Please enter your 
> <b>full name</b>.</
> span>',
>                         email: '<span class="error">Please enter a valid 
> <b>email address</
> b>.</span>',
>                         company: '<span class="error">Please enter your 
> <b>company</b>.</
> span>',
>                         phone: '<span class="error">Please enter your 
> <b>phone number</b>.</
> span>'
>                 },
>                 submitHandler: function(form) {
>
>                         $('#contactForm').ajaxSubmit({
>                                 resetForm: true,
>                                 target: '#success',
>                                 success: function() {
>                                         
> $("#success").fadeIn('slow').fadeTo(5000, 1).fadeOut('slow');
>                                 }
>                         });
>                 }
>         });
>
> });
>
> </script>
>
> <form id="contactForm" method="POST" action="process.php">
>
> //FORM GOES HERE
>
> </form>
>
> On Nov 18, 3:08 pm, "Atkinson, Sarah" <sarah.atkin...@cookmedical.com>
> wrote:
>
> > Do I have to create a custom method and stick a function in there?

Reply via email to