alertify

Confirm box return value from alertify plugin and jquery

与世无争的帅哥 提交于 2019-12-12 20:24:45
问题 I have a confirm dialog for my form. it is inside a jquery submit function. I am using alertify to show the confirm dialog. But problem is my jquery submit function returns before alertify gets the confirm box value. Read that alertify is non blocking. Any way to overcome this and return the confirm box value back to my form? $("#viewform").submit(function(){ alertify.confirm("Delete the selected entry?",function(e){ if(e) return true; else return false; }); }); The function always returns

Javascript Alertify with return from confirm

旧街凉风 提交于 2019-12-12 10:36:41
问题 I'm trying to use alertify.js as a confirmation dialog for all my confirm scripts. But it just isn't working like regular JS confirm does. In the code below I never get a return true function aConf ( mes ) { alertify.confirm( mes, function (e) { return e; }); } <a href="#" onclick="if(aConf(\'Are you sure you wish to remove this?\')) { function(); } return false;">Delete</a> Of course if I replace aConf with JS' confirm it works. So why is alertify not sending me back it's outcome? 回答1:

alertify upon a bootstrap modal not working

微笑、不失礼 提交于 2019-12-10 17:45:08
问题 I have a modal with a button 'open prompt': <div class="modal fade" id="test" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Arquivo</h4> </div> <div class="modal-body"> <a href="javascript:my_prompt();" class="button">Open prompt</a> </div> <div class=

How to insert an image into an alertify.js alert with JavaScript?

末鹿安然 提交于 2019-12-08 07:00:30
问题 I want to create a pop-up dialog with a large image and an OK button and for this I'am trying to customize the alerts of alertify.js . My idea was to create a custom css class for all these "popup-alerts" with an default image url, and then change the url background-image: url(images/level_10.jpg); when I create the pop-up to the right image with JavasScript (because you can pass in a custom cssClass when you call the function); I'm not sure whether this is possible at all. Or is there maybe