Jquery modal prompt

If you've tried the impromptu jquery plugin, you're probably left with some frustrating feeling, finding that  such an easy solution for javascript alert, confirm and prompt replacement, could be enhanced by a nicer graphic design. Replacing the "X'" letter by a now standard close button, just like can be found on facebox, could do the job. But then why not benefit default facebook style layout and use the whole facebox plugin, or go for another stylish modal jquery plugin, such as jModal... A few lines of javascript code will easily replace the prompt function, just like the lines of code from the example below.

function jqPrompt(lang, uniqueId, qty , MsgPerso)
{

strPrompt ="Please enter your name";
msg = "<
"+ strPrompt ; msg = "

"; msg += " Submit"; msg += ' Cancel ' msg += "
"; jQuery.facebox(msg) } function closeFaceBox(MsgPerso) { jQuery(document).trigger('close.facebox'); if (uniqueId!=null && MsgPerso!="") displayCart(lang, uniqueId, qty, MsgPerso) }
1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *