PDA

View Full Version : Help with Modeless Window script?



jimdavenport2001
12-05-2007, 09:22 AM
1) Script Title:
Modeless Window

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

3) Describe problem:
Ok, here is the part I used

<script>
function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

//configure URL and window dimensions (width/height)
modelesswin("http://www.davenporthall.com/_includes/musicplayer.htm",320,240)
</script>

My question is how can I keep the window in place when the user clcks on the next page in my site. I have tried 100's different scripts and none function like this one. I like this version because it was simple. I want to open a new window that contains a music playlist that people can listen to while browsing my site. But not keep reloading the playlist each time they navigate to a new page. Please keep it simple I'm very new to scripting but learning.

Thanks...

ddadmin
12-05-2007, 10:03 AM
You can simulate a DHTML window appearing at the exact same place from page to page, but there is no real way to persist its existence. Basically you still need to call a new instance of the window for each page you wish it to appear on, defeating what you're trying to accomplish here, which is a seamless uninterrupted transition. That's more of a limitation/ behavior of JavaScript than anything else.

Now, one way to get a music playlist to play uninterrupted from page to page is by structuring your site using frames, and have the static left frame for example contain the music playlist interface. Of course that may not be acceptable to you either from a design standpoint.