jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window Re-Initilize the Window

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 7 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Re-Initilize the Window #100483

    Dave_1
    Participant

    Hello am trying to re-initialize jqx window, but it does not work properly.

    
          $("#jqxwindow").jqxWindow({height: 'auto', width: '70%',resizable: false,draggable: false, theme: 'dark', isModal: true, autoOpen: false });
            // //on close destroy the jqx window
          $('#jqxwindow').on('close', function (event) {
               // $('#jqxwindow').jqxWindow('destroy');           
               $('#jqxwindow').remove();
          });
          $("#popup").click(function () {
              $("#grid").jqxGrid('clearselection');
                getselectedrowindexes =null;
                selectedRowData =null;
                $('#_id').val('');
                vm._id ='';
              
              $("#jqxwindow").jqxWindow('open');
          });
          $("#button_input").click(function () {
              var T = $("#text_input").val();
              $("#textbox").text(T);
              $("#jqxwindow").jqxWindow('close');
          });
          $("#button_no").click(function () {
              $("#jqxwindow").jqxWindow('close');
          });
    

    after destroy or remove method, window is not re-Initialized again.

    Re-Initilize the Window #100501

    Martin
    Participant

    Hello Dave_1,

    The window can not be re-initialized after you have once destroyed or removed it.
    This is because when these methods are called, the element is also removed from the html, so you can no longer select it.
    So, if you would open the window again, you should only close it, not destroy it.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.