What steps will reproduce the problem?
After i submit a form with ajax in a nyromodal lightbox, the nyromodal script does not execute the success ajax option... The
script insert in a correctly mode the data in a db, but when the php script finish execution, appear the error
What is the expected output? What do you see instead?
The output is: The requested content cannot be loaded. Please try again later. Close
I notice that if i insert complete ajax option, it works good, but i need success and errror ajax function..
What version of the product are you using? On what operating system?
1.5.5 nyromodal
Please provide any additional information below.
This is my script:
$('#registerSubmit').click(function(e)
{
// evitiamo che il form sia inviato prima che i controlli siano ok
e.preventDefault();
if($('#nickname').isValid() && $('#inputPassword').isValid() && $('#inputConfirmPassword').isValid() &&
$('#inputEmail').isValid() && $('#inputConfirmEmail').isValid() && $('#contratto').isValid())
{
$.nyroModalManual(
{
ajax:
{
type: "POST",
url: "libs/newAccount.php",
//dataType: "html",
data:
'username='+$('#nickname').val()+'&password='+$('#inputPassword').val()+'&repassword='+$('#inputConfirmPassword').val()+'&email=
'+$('#inputEmail').val()+'&reemail='+$('#inputConfirmEmail').val(),
//cache: false,
success: function()
{
$.nyroModalManual(
{
bgColor: '#3333cc',
content: 'Registrazione avvenuta con successo..'
});
alert("Bello..");
},
error: function()
{
alert("Errore nell'invio del form, riprova o contatta un Amministratore...");
},
complete: function()
{
alert("complete...");
}
}
});
}
return false;
});
works perfecty.. i solved it.. close issue.. for other, this is the solution: $.ajax( { type: "POST", url: "libs/newAccount.php", dataType: "html", data: 'username='+$('#nickname').val()+'&password='+$('#inputPassword').val()+'&repassword= '+$('#inputConfirmPassword').val()+'&email='+$('#inputEmail').val()+'&reemail='+$('#i nputConfirmEmail').val(), cache: false, success: function(html) { $.nyroModalManual( { minHeight: 5, content: 'Registrazione avvenuta con successo.<br /><a href="index.php" class="nyroModalClose">Prosegui..</a>' }); }, error: function() { alert("Errore nell'invio del form, riprova o contatta un Amministratore..."); } });