jQWidgets Forums
jQuery UI Widgets › Forums › Dialogs and Notifications › Window › Multiple windows with the same id
Tagged: multiple window same id
This topic contains 9 replies, has 4 voices, and was last updated by chandrika.sharma 8 years, 6 months ago.
-
Author
-
Hi!
Is it possible to show multiple windows which have the same id?
Hi jqWizard,
Each HTML Elements in the DOM should have unique ID.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Yes that’s correct but I have one window (one div with header and content) and I can only open it once. Is there a way to open the same window twice? One window, two instances.
Hi jqWizard,
Do not destroy the window and you will be able to open it as many times as you wish. I also suggest you to look at the jqxWindow demos. In most of the demos, the same window can be closed and opened multiple times through buttons that call API methods.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI saw multiple windows demo but this is not the functionality I want to implement because it dynamically creates windows. I want to have multiple windows opened with different content and all are based on the same HTML skeleton.
I think we still don’t understand each other. Well, I wasn’t clear enough. I can open and close the window as many times as I wish, this is working as expected.
Let me explain …
Current code:
– in HTML I have a skeleton for one window (div which contains div for header and content) and skeleton for button
– in JS I defined button click event which opens the window with some dynamic helpHere’s what I would like to do:
– upon first click on the button, open the window with help A
– upon second click on the button, open the window with help B BUT window with help A must stay opened
– and so on …Is this a little bit clearer?
Hi jqWizard,
It seems that you need to open multiple windows with other content. I do not see a problem here as this is the same as our http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxwindow/multiple-windows.htm?web demo where windows are opened dynamically with different content. In addition, you may dynamically change the content of an opened window by using the “setContent” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/It’s not the same and the content is not the issue here. You’re creating windows dynamically (html skeleton is dynamically added) but I want to have multiple windows which are based on one skeleton. And all windows can be open at the same time.
Below is my code:
HTML
<div id="windowAlert"><div id="windowAlertHeader"><span id="windowTitle" class="window-header-text">TEST</span></div><div id="windowAlertContent"><span id="windowTextSample">sample</span></div></div>
JS
$('#windowAlert').jqxWindow({height : 500,width : 420,autoOpen : false,isModal : false,resizable : false});$('#btnWindow').click(function() {$('#windowAlert').jqxWindow('open'); // when I click three times, I should have three windows open and not just one});
Hi,
I have a related use case. But I need to use the same window in 2 different pages.i.e i add the window div in a jsp and include the jsp in 2 different jsps which are not conflicting.
Is that allowed? Will i still be ble to use the window?
Thanks,
JignyasaHi,
Is it possible to achieve multiple windows feature in angular2?
I want to add new windows on button click. I am unable to achieve this in angular2. Please provide me a solution of it if exist. -
AuthorPosts
You must be logged in to reply to this topic.