help with jqueryui dialogs please
hi
please i need help
i have 2 dialogs in my page
and i open them with 2 links
everything working fine
the only problem is sometime one dialog submit fine and the other don't submit here is my code:
-
$(document).ready(function(){
('#dialog1').dialog({
autoOpen: false,
width: 400
});
$('#dialog2').dialog({
autoOpen: false,
width: 400
});
$('#dialog1_link').click(function(){
$('#dialog1').dialog('open');
return false;
});
$('#dialog2_link').click(function(){
$('#dialog2').dialog('open');
return false;
});
$('#editprofile').submit(function() {
// submit the form
var options = {
target: '#content',
type: 'post'
};
$('#editprofile').validate({
submitHandler: function(form) {
$('#editprofile').ajaxSubmit(options);
}
});
// return false to prevent normal browser submit and page navigation
return false;
});
$('#editlogin').submit(function() {
// submit the form
var options = {
target: '#content',
type: 'post'
};
$('#editlogin').validate({
submitHandler: function(form) {
$('#editlogin).ajaxSubmit(options);
}
});
// return false to prevent normal browser submit and page navigation
return false;
});
});
i use jqueryui and 2 jquery plugins: jquery.validate.js and jquery.form.js
thank you for your time