jQuery UI Widgets › Forums › Dialogs and Notifications › Window › Simple confirm("yes/no") like in javascript
Tagged: Angular window, angular2 window, bootstrap window, javascript window, jquery window, jqwidgets window, jqxwindow, typescript window
This topic contains 5 replies, has 2 voices, and was last updated by Hristo 8 years, 1 month ago.
-
Author
-
Is there a way to get a simple confirm from the user looking nice in a jqWindow
e.g. in javascript
if (confirm(“Deleting this decision item will delete any children of this decision item, are you sure?”)
// do deletewhen I use jqWindow it doesn’t wait?
<div id=”SureDeleteDecisionItem”>
<div>Confirm deleting decision item</div>
<div>
Deleting this item will delete any children, are you sure?<br/>
<input type=”button” value=”No” id=”SureDeleteDecisionItemNo” />
<input type=”button” value=”Yes” id=”SureDeleteDecisionItemYes” />
</div>
</div>$(“#SureDeleteDecisionItem”).jqxWindow({ height: ‘auto’, width: 350, autoOpen: false, isModal: true, okButton: $(‘#SureDeleteDecisionItemYes’), cancelButton: $(‘#SureDeleteDecisionItemNo’) });
var test = $(“#SureDeleteDecisionItem”).jqxWindow(‘open’);Hello Rhys,
Could you provide us your example in jseditor for better analyze to understand whole structure of the project?
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
I have the normal JS way of doing it and what I am trying to do with jqWindow here:
https://www.jseditor.io/?key=confirm-modal
The behaviour is not quite the same in jsEditor as the window doesn’t close when a button is hit but hopefully there is enough there to help you understand what I am trying to acheive.
PS> Is there a special way I should use the JS and HTML in jsEditor to make it work the same as it does on my computer?
Thanks
RhysHello Rhys,
Thank you for this example. I would like to ask you to save again the example after you share it.
(Share – option ‘Everyone’ and then save again this)File | Project | Share | My Account | +- With specific people > +- Everyone < +- Document link
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comDone, let me know if I need to set soemthing else?
Hello Rhys,
Please, take a look at this (edited) example:
https://www.jseditor.io/?key=confirm-modal-edited-1
(It is almost same, you have one missing reference – “jqx.base.css”)Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.