jQuery UI Widgets Forums Dialogs and Notifications Window Simple confirm("yes/no") like in javascript

This topic contains 5 replies, has 2 voices, and was last updated by  Hristo 4 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • Rhys
    Participant

    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 delete

    when 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’);


    Hristo
    Participant

    Hello Rhys,

    Could you provide us your example in jseditor for better analyze to understand whole structure of the project?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    Rhys
    Participant

    Hi 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
    Rhys


    Hristo
    Participant

    Hello 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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

    • This reply was modified 4 years, 6 months ago by  Hristo.
    • This reply was modified 4 years, 6 months ago by  Hristo.
    • This reply was modified 4 years, 6 months ago by  Hristo.

    Rhys
    Participant

    Done, let me know if I need to set soemthing else?


    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.