23
Using the jQuery Validation Engine with modal & dialog plugins
This is a question I often get asked by email, and I think there is enough requests to warrant a small blog post.
All about the DOM
The validationEngine expect your form to be present on the page when you initialize the plugin, and this is where modal plugins fall short. If your using those plugins you generally want to load a new piece of html into your document using AJAX.
In that case you need to initialize the validationEngine after you loaded your modal content. Generally modal plugins have an api that let you do this. Let’s take 2 example, Colorbox and jQuey ui.
Colorbox :
-
$(document).bind('cbox_complete', function(){
-
$("#formID").validationEngine();
-
});
jQuery UI :
-
$( ".selector" ).bind( "dialogopen", function(event, ui) {
-
$("#formID").validationEngine();
-
});
That should give you a pretty good idea of what you need to do whatever the…
Articles
Some Tweets
- Just got my ass handed to me by CKeditor, again..
- mac osx appstore rules are insane
- Kind of surprise there is no article about listing positions in the chrome web store
- Using CSS without HTML http://t.co/DitNwX85
- Thanks to @nextmontreal and @byosko for the nice article on @weddingdeck
- Google using its android app Kill Switch http://t.co/HDQT5NCq



