locked
Modal Popup RRS feed

  • Question

  • User1979860870 posted

    Hi

      What should be changed in below code so that Modal Popup opens on click of button

    {
                    "defaultContent": '<button id="btnEdit" type="submit"><i class="fa fa-pencil"></i></button>'
                }

    Thanks

    Saturday, May 29, 2021 3:51 PM

Answers

  • User1535942433 posted

    Hi jagjit saini,

    What's your meanings? I'm guessing that you have a jquery Datatable and when you click the columns in datatable, it will show modal popup.

    If you need to do this,you could refer to below sample.

    https://jsfiddle.net/t53cyutt/3/

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 31, 2021 5:24 AM

All replies

  • User475983607 posted

    The code construct depends on the modal library you are using which you have not shared. 

    The code you have shared contains a submit which submits an HTML form.  Any opened modal will be over written by the page refresh.  You did not share all the relevant code or describe how the design is intended to work so the community cannot provide accurate advice. 

    In addition to reading the modal docs, I recommend learning basic HTML forms rather than posting every little problem you have.

    Sunday, May 30, 2021 11:19 AM
  • User1535942433 posted

    Hi jagjit saini,

    What's your meanings? I'm guessing that you have a jquery Datatable and when you click the columns in datatable, it will show modal popup.

    If you need to do this,you could refer to below sample.

    https://jsfiddle.net/t53cyutt/3/

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 31, 2021 5:24 AM