Results 1 to 7 of 7

Thread: Dynamic Frames

  1. #1
    Join Date
    Sep 2005
    Location
    In an overgrown fishing village
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dynamic Frames

    Probably a simple task but not as simple as I thought.

    I have a page set up using two frames with the classic setup:

    <frameset cols="229,*" >
    <frame name="contents" target="main" src="filelist.html" scrolling="no" noresize>
    <frame name="main" src="VideoPlayer.html">
    <noframes>
    <body>

    <p>This page uses frames, but your browser doesn't support them.</p>

    </body>
    </noframes>
    </frameset>

    I want to create links in the Filelist.html that will open up video files to play in the second frame. This means the text in the second frame need to be updated dynamically to play a different file.

    The video frame reads like this:
    <TABLE cellSpacing=0 cellPadding=0 border=0 width="455">
    <TBODY>
    <TR>
    <TD colSpan=3 width="473">
    <p align="center"><IMG height=46 alt="" src="TV files/tv02.gif"
    width=522 border=0></p>
    </TD></TR>
    <TR>
    <TD width="93"><IMG height=240 alt="" src="TV files/tv03.gif"
    width=100 border=0></TD>
    <TD align="center" width="320" padding="0" bgcolor="#000000">
    <OBJECT ID="mediaPlayer" width="320" height="240"
    CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
    CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
    STANDBY="Loading Microsoft Windows Media Player components..."
    TYPE="application/x-oleobject">
    <param name="Filename" value="videos/playlist.m3u">
    </OBJECT>
    </TD>
    <TD width="69"><IMG height=240 alt="" src="TV files/tv05.gif"
    width=102 border=0></TD></TR>
    <TR>
    <TD colSpan=3 width="473">
    <p align="center"><IMG height=46 alt="" src="TV files/tv06.gif" width=522 border=0></p>
    </TD></TR></TBODY></TABLE>

    the TV giff files create a frame that looks like a telivision nothing more.
    What I need to update is the "Value" of the media player object and then refresh the page. The result will go on a disk of DIVX video files.

    I would have asked if I could just tell the Media player object to cycle through the platlist file from the web page but something tells me that would be harder.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    There may be a way to do this with javascript, but then non javascript enabled browsers will have problems viewing the different videos. One of the main reasons for using frames in the first place is to be able to load in different pages to a given frame. I'd suggest making up separate pages for each video say:

    VideoPlayer0.html
    VideoPlayer1.html
    VideoPlayer2.html

    etc. Then loading them in with links on the filelist.html. You could use javascript to prevent history stacking (which is the only user apparent effect you would achieve with your idea):
    HTML Code:
    <a href="VideoPlayer1.html" target="main" onclick="parent.main.location.replace(this.href);return false;">Movie Title</a>
    Non javascript browsers will experience history stacking but, at least get to see the videos.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Location
    In an overgrown fishing village
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply although the issue is not actually one of java vs non-java. The destination for the project is a data DVD containing a collection of about 20 to 40 divx files plus photos. Think wedding style setup only not. My intention was to have have the disk boot up into a webpage where you can both view the picture galleries or go to this section and simply show a filelist on one side and a movie player on the other. Oh, and I may want to re-use the system for other disks. The hint to illiminate it from the history stacking is cool and I'll keep that in mind (and might have to use that alternative) but it would be nice if I could script the process with javascript... Standard compatibility for IE NS or Firefox (the browsers I know it will be on).

    I saw scripts in dynamic drive for generating popup pages on the fly, is there any way I could make a generated page like that apear in my second frame maybe??

    Oh, sorry for so long between replies.
    <-- is shift worker.

    ~Kirsty

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    I'm not aware of a script for that:
    I saw scripts in dynamic drive for generating popup pages on the fly, is there any way I could make a generated page like that apear in my second frame maybe??
    on DD here, which one? It is possible though but, as far as I know a page like that cannot be put inside a frame. However, a single 'stock' page can be made up, a template. Then certain values on the template can be filled in using variables passed to it on its url. This still involves javascript or some other scripting language. This method is full of potential pitfalls on the internet but, if you are releasing this only on a disk and are sure all browsers will be either modern IE (5+) or modern Mozilla based like NS6+ and FF1.0+, it should be OK. Another problem will arise in IE though. Using javascript in locally run material will pop-up a security warning in the alert bar and/or a security violation 'page cannot be loaded' unless 'the mark of the web' is on all the pages. I still think a separate page for each video is the way to go but, if you want to try this out, 'the mark of the web' can be given to a page by putting:
    Code:
    <!-- saved from url=(0014)about:internet -->
    just below the <html> tag. This must be done to all pages used in the presentation. Then a link can look like this:
    HTML Code:
    <a href="VideoPlayer.html?vidList=videos/playlist.m3u">Link Text</a>
    Pulling that variable out is easy enough, applying it inside your OBJECT tag may be a little tricky and you may need to expand that tag to be an object/embed tag to work in Mozilla, not sure. OK, the script on the receiving page to catch this one variable could be:
    Code:
    <script type="text/javascript">
    var vidList=location.href.split('=')[1]
    </script>
    and be placed in the head of the VideoPlayer.html page. Then for your OBJECT tag, you could use document.write:
    Code:
    <TD align="center" width="320" padding="0" bgcolor="#000000">
    <script type="text/javascript">
    document.write('<OBJECT ID="mediaPlayer" width="320" height="240"\n\
    CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"\n\
    CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"\n\
    STANDBY="Loading Microsoft Windows Media Player components..."\n\
    TYPE="application/x-oleobject">\n\
    <param name="Filename" value="'+vidList+'">\n\
    </OBJECT>\n')
    </script>
    </TD>
    Right there in the body where the tag normally would go.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2005
    Location
    In an overgrown fishing village
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    YAAAAAAAAAAAAAAAAAAAAAAAAAAAY

    It works It Works...
    A little fine tuning and I'll post the finished product here as an attachment so you can see what I was doing.

  6. #6
    Join Date
    Sep 2005
    Location
    In an overgrown fishing village
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here w3 go.

    One top of the line CD/DVD index system for display of pictures and videos.
    Now that I have a template I've already burned three disks with this.
    - This one (which was mainly a test)
    - One of my cousins wedding photo's and videos
    - and a collection of pictures on their own cause mum is trying to made a digital gallery of family photos.

    Unzip and take a look.
    I had to remove the GIFs to create a TV look. I'd stole the ones from http://www.grif.tv/ and modified the bottom part to not have a frame so you get the picture.
    And at the moment only Video List and Gallery are linked up..

    [edit]
    Not frame, stand.. Bah, you get what I mean..
    *blush*
    Last edited by Irish Witch; 10-03-2005 at 06:30 AM. Reason: Typo

  7. #7
    Join Date
    Sep 2005
    Location
    In an overgrown fishing village
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default On a side note.

    Since I'm not going to post twice here's a link.
    This is what I'm using to Autoboot the CD onto the web page.

    http://www.dynamicdrive.com/forums/s...8527#post18527

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
  •