jQuery UI Widgets › Forums › Dialogs and Notifications › Window › Window recreate
Tagged: html5 dialog, jquery dialog, jqwidgets
This topic contains 4 replies, has 2 voices, and was last updated by saravananmra 11 years, 8 months ago.
-
AuthorWindow recreate Posts
-
Hi,
I am unable to recreate the window.I have done the below,
– When button (name is claim) is clicked, i am creating and opening a window (I have HTML close button in that window)
– once clicked on the close button i am destrying and closing that window because once i closed this window i have to again call the same function(window’s create and open) when clicked on the button (button name is claim) again
– now when button(button name is claim) is clicked again i am not able to recreate the window.Please suggest.
Regards,
M.Saravana kumarHi,
The window’s ‘destroy’ method removes the window from the DOM. If you want to ‘destroy’ it, then you will have to add a new DIV tag and then initialize a new window instance from it. Another option is to use the following approach: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxwindow/defaultfunctionality.htm?web
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Thanks for the quick reply and ur approaches.http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxwindow/defaultfunctionality.htm?web
– here once the page loads, the window instialization is happening and also this window doesn’t have model true.But in my case, i need model:true.. If i use this approach with model:true the shadow is appearning once the page loads. Please suggest.
I want to achieve the below using JQwidets,
Whenever i click on the button i should open the window with model:true.
whenever i close(HTML close button and also window close icon) the button i should close the same window.Regards,
M.Saravana kumarHi saravananmra,
To disable the auto-open behavior, set the jqxWindow’s autoOpen property to false during the initialization.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Thanks for this solution for the issue 1
Issue 2 is, how do we recall the window intialization for the second popup?My code is,
$(‘#’+config.id).jqxWindow({
showCollapseButton: true,
theme: config.theme,
resizable: config.resize,
width: config.wdh,
height: config.ht,
isModal: config.modal,
autoOpen: false
});Where Config is a JSON object. It has id of the Div, theme name, resize etc..
Please suggest as i am using this generic function for opening windows.
Thanks in advance.
Note:
I don’t want to do the window intialization code again and again for each popup.Thanks,
Saravana kumar -
AuthorPosts
You must be logged in to reply to this topic.