Problem Solved!
@link: https://github.com/trentrichardson/jQuery-Impromptu/issues/6
Quote
With the new event system the callback is bound onto the prompt. So callback must be called before the prompt is destroyed. Impromptu is not intended for multiple prompts at one time.
If you should want to work around this an easy solution would be to setTimeout(10, function(){ $.prompt(...); }); Inside of the callback. This will give opportunity for the previous prompt to close.
Fixed Javascript
var txt = '<input type="text" name="email_address" value="" />';
function mycallbackform(e,v,m,f)
{
if(v != undefined)
{
if (v == true)
{
if (f.email_address.length == 0)
{
setTimeout(function(){ $.prompt('Please supply an email address for the customer'); }, 10);
}
else
{
$.post('". $this->view->url(array(), 'admin-create-user-from-checkout') ."', f, function(data) {
if(data.status)
{
$.prompt('Customer Record Created Successfully');
}
else
{
$.prompt('Customer Record could not be created');
$('#email_address').val($('#old_email_address').val());
}
}, 'json');
}
}
else
{
$('#email_address').val($('#old_email_address').val());
}
}
$.prompt(txt,{callback: mycallbackform, buttons: { Ok: true, Cancel: false }});