Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form ajax errors #24

Closed
androidealp opened this issue Dec 15, 2015 · 1 comment
Closed

form ajax errors #24

androidealp opened this issue Dec 15, 2015 · 1 comment

Comments

@androidealp
Copy link

Hi,

How to insert custom code for manipulate the event emodal to close?

My form is loaded into the emodal, if the submit form is not available, i want that the eModal not close, if is available then close emodal.

//this code emodal ajax
buttons: [
                {text: 'Salvar', style: 'info',   close: false, click: save },
                {text: 'Fechar', style: 'danger', close: true}
            ],
//this code event save
function save(){
$.ajax({
sucess:function(data){

if(data.error){
$.notify({data.error.msn});
eModal.close(false); // ????
}else{
$.notify({data.success.msn});
eModal.close(true); // ????
}

}
});
}
@saribe
Copy link
Owner

saribe commented Dec 15, 2015

You can use remove "eModalclose(false);" and use eModal.close() instead "
eModalclose(true);" to close the current modal.

Samuel Ribeiro Pinto

2015-12-15 1:59 GMT+00:00 androidealp notifications@github.com:

Hi,

How to insert custom code for manipulate the event emodal to close?

My form is loaded into the emodal, if the submit form is not available, i
want that the eModal not close, if is available then close emodal

//this code emodal ajax
buttons: [
{text: 'Salvar', style: 'info', close: false, click: save },
{text: 'Fechar', style: 'danger', close: true}
],//this code event savefunction save(){$ajax({sucess:function(data){
if(dataerror){$notify({dataerrormsn});eModalclose(false); // ????
}else{$notify({datasuccessmsn});eModalclose(true); // ????
}

}
});
}


Reply to this email directly or view it on GitHub
#24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants