Results 1 to 2 of 2

Thread: Help with Modeless Window script?

  1. #1
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Modeless Window script?

    1) Script Title:
    Modeless Window

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...odelesswin.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...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •