Hi,
I have a form inside a JqueryUI dialog that is showed when i click a link. If i try to submit the form and there are validation errors, the form is not showed inside the dialog. So what should i do to keep the form inside the dialog when there are validation errors?
This is my code:
<script type="text/javascript">
$(function (){
$('a.ajax').click(function() {
var url = this.href;
var dialog = $('<div style="display:hidden"></div>').appendTo('body');
// load remote content
dialog.load(url,
{},
function (responseText, textStatus, XMLHttpRequest) {
dialog.dialog();
}
);
//prevent the browser to follow the link
return false;
});
});
</script>