Jörn,

That would be outstanding. My problem now is, I need this 'stuff' in the
submit. By placing .validate() in the submit I'm able to do both, but.....
(see script first):

     $('#CSForm').submit(function(){
        var selField = $('select#Make', this);
        rewriteMakeOption(selField);

        var errContainer = $('#CSForm div.error');
        var v = $(this).validate({
            errorContainer: errContainer,
            errorLabelContainer: $("ol",errContainer),
            rules: {
                First_Name: "required",
                Last_Name: "required",
                EMail: {
                    required: true,
                    email: true
                },
                Make: "required",
                Model: "required"
            },
            messages: {
                First_Name: "Please enter your First Name",
                Last_Name: "Please enter your Last Name",
                EMail: "Please enter a valid email address",
                Make: "Please select a make",
                Model: "Please select a model"
            },
            wrapper: 'li'
        });

        if(v.form()){
            return true;
        }
        else
            return false;
    });

So, I am running a method that rewrites the 'value' of the selected option
in a select. This also removes all of the other options in the process
(since they shouldn't be needed, right?) But, if the validation fails I've
already rewritten the select, so nothing is available any longer. Itchy,
huh?


-- 
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com
---------------
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present

Reply via email to