should be the best jquery validation plugin.
This code works outside of the dialog DIV:
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("form") Valid (); $ ("a"). Bind ("click", function () {alert ($ ("form"). Valid ( ));});}); & Lt; / Script & gt; & Lt; Form method = "get" action = "" & gt; & Lt; P & gt; Name & lt; Input id = "name" name = "name" class = "required" minlength = "2" /> & Lt; / P & gt; & Lt; P & gt; E-mail & lt; Input id = "cemail" name = "email" size = "25" class = "required email" /> & Lt; / P & gt; & Lt; A href = "#" id = "clickTest" & gt; Click & lt; / A & gt; & Lt; / Form & gt;
This works great when I open this form in my dialog box, click on the open dialog, and click on the link that does not correct, no buno.
To use this killer jquery validation plugin, & lt; Form & gt;
tag? Or is there a better way to do it successfully?
If someone else comes to it, then the JQuery-UI dialogue is not attached to the form, it Only & lt; / Body & gt;
, so to validate the element & lt; Form & gt; & Lt; / Form & gt;
section:
To resolve this, when you direct the dialog to go inside of itself when you create it, such as:
$ ("# Mydiv") .dialog ("open") parent () appendTo (jQuery ("form: first")); ..
Comments
Post a Comment