View Full Version : Window Widget keep open

09-10-2007, 05:41 PM
1) Script Title: DHTML widget keep open until closed

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

3) Describe problem: Hello! I have a CMS type web site that uses common headers, footers, etc. I loaded the widget to display an NFL scoreboard when the link is clicked so that it displays accross the entire web-site. The problem is that as you link any other page within the site, the widget closes and the user will have to re-open the widget and reposition it on the new page. Is there a way that if the user opens the widget, that it can remain open when moving between pages until the user actually closes the widget themselves. Thanks for any suggestions that anyone may have.

09-11-2007, 04:48 AM
One way is to add persistence to the DHTML window using cookies, so the state of an window's open/close state is remembered. See this thread: http://www.dynamicdrive.com/forums/showthread.php?t=20624 Also, if your pages containing the same DHTML window is spread across different directories within your site, you'd want to modify the dhtmlwindow.js file referenced in that thread with the following change:

document.cookie = name+"="+value+"; path=/"

This makes the persistence site wide, instead of directory wide.