I am new to jQuery and am having trouble understanding how to use the
Form Plugin with the Validation Plugin.

I can get both plugins to work separately but not together.

Here is my code for the form plugin which works great -

     $('#myForm').ajaxForm(function() {
                        $.get('tasks.cfm',{},function(data){
                                $('#newTasks').html(data);
                        })
                });

After looking at the sample on the Validation Plugin page I have the
following code which does not work the way I want it to -
              jQuery("#myForm").validate({
                        meta: "validate",
                        submitHandler: function(form) {
                                jQuery(form).ajaxSubmit({
                                        target: "#newTasks",
                                });
                        }
                });

The validation is working! I seem to be submitting data to my action
file. What I want to do is call in my tasks.cfm file just like I did
in my original code prior to using validation. I ve tried many
variations of this code and have looked through the group extensivly
and just am not understanding this at all.

Any help would be great! Thank you in advance.
John

I have a partial posting of my form below.

Here is part of my form code -

<form action="session.cfm" id="myForm" method="post">
         <ul>
             <li class="list-width-third">
                 <select name="formName" id="nameForm">
                                         <cfoutput query="chooseForm">
                        <option>#chooseForm.formNames#</option>
                     </cfoutput>
                 </select>
             </li>
             <li class="list-width-third">
                 <select name="assignTo" id="assignTo">
                                         <cfoutput query="assignTo">
                        <option>#assignTo.assignPerson#</option>
                     </cfoutput>
                 </select>
             </li>
                <li class="list-width-third">
            <input id="targetDate" name="targetDate" class="pickdate
{validate:{required:true, messages:{required:'Please fill in.'}}}"/>
</li>
         </ul>
             <p><input name="AddToQuery" value="AddToQuery"
type="submit" /></p>
        </form>

Reply via email to