[jQuery] Re: ajaxform validation submission probs
Hi Joern, thanks for posting that link. The example works, but there's one more thing to sort out: It does not submit the submit button's value. Can you please explain how I get this value across? Thanks! On Nov 11, 7:24 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Check this example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de... Use ajaxSubmit instead of ajaxForm and put that into the submitHandler. Jörn
[jQuery] Re: ajaxform validation submission probs
Check this example: http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html Use ajaxSubmit instead of ajaxForm and put that into the submitHandler. Jörn On Tue, Nov 11, 2008 at 9:19 AM, lance123 [EMAIL PROTECTED] wrote: Hi To All, I am trying to get the jquery ajaxform plugin to work with the validate plugin and I cannot seem to get submission right! It will not stop the submission process no matter what I do. :( Here is my test code...any help much appreciated. Thanks Lance $.validator.setDefaults({ submitHandler: function() { alert(submitted!); } }); $().ready(function() { // validate signup form on keyup and submit $(#formaaa).validate({ rules: { username: { required: true, minlength: 2}, }, messages: { username: { required: Please enter a username, minlength: Your username must consist of at least 2 characters }, } }); }); var FormID; $(document).ready(function () { //Bind the mouseover function to the form element $(form).bind(mouseenter mouseleave, function(e){ FormID=(this.id); // bind form using ajaxForm $('#'+FormID).ajaxForm({ // target identifies the element(s) to update with the server response target: '#htmlExampleTarget'+FormID, url: 'html-echo.php', // success identifies the function to invoke when the server response // has been received; here we apply a fade-in effect to the new content success: function() { $('#htmlExampleTarget'+FormID).fadeIn('slow'); } }); }); }); /script style p { background:yellow; font-weight:bold; cursor:pointer; padding:5px; } p.over { background: #ccc; } span { color:red; } /style /head body form id=formaaa class= action= method=post onSubmit=return false; Message: input type=text name=username value= id=username class=required minlength=10 / input type=submit value=Echo as HTML / /form h3htmlExampleTarget (output will be added below):/h3 div id=htmlExampleTargetformaaa/div /body /html
[jQuery] Re: ajaxform validation submission probs
Thanks Jorn, I will give that a go :) Lance On Nov 11, 7:24 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Check this example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de... Use ajaxSubmit instead of ajaxForm and put that into the submitHandler. Jörn On Tue, Nov 11, 2008 at 9:19 AM, lance123 [EMAIL PROTECTED] wrote: Hi To All, I am trying to get the jquery ajaxform plugin to work with the validate plugin and I cannot seem to get submission right! It will not stop the submission process no matter what I do. :( Here is my test code...any help much appreciated. Thanks Lance $.validator.setDefaults({ submitHandler: function() { alert(submitted!); } }); $().ready(function() { // validate signup form on keyup and submit $(#formaaa).validate({ rules: { username: { required: true, minlength: 2 }, }, messages: { username: { required: Please enter a username, minlength: Your username must consist of at least 2 characters }, } }); }); var FormID; $(document).ready(function () { //Bind the mouseover function to the form element $(form).bind(mouseenter mouseleave, function(e){ FormID=(this.id); // bind form using ajaxForm $('#'+FormID).ajaxForm({ // target identifies the element(s) to update with the server response target: '#htmlExampleTarget'+FormID, url: 'html-echo.php', // success identifies the function to invoke when the server response // has been received; here we apply a fade-in effect to the new content success: function() { $('#htmlExampleTarget'+FormID).fadeIn('slow'); } }); }); }); /script style p { background:yellow; font-weight:bold; cursor:pointer; padding:5px; } p.over { background: #ccc; } span { color:red; } /style /head body form id=formaaa class= action= method=post onSubmit=return false; Message: input type=text name=username value= id=username class=required minlength=10 / input type=submit value=Echo as HTML / /form h3htmlExampleTarget (output will be added below):/h3 div id=htmlExampleTargetformaaa/div /body /html