Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Thanked 0 Times in 0 Posts

    Add color and styles to popup window

    Hi folks, I have a web site where I pop a window with an embeded Windows Media Player.
    The site uses master pages and content pages, and has several style sheets.

    On the master page for the video content that contains the pop-up, I include this code in the head:

        <script language="javascript" type="text/javascript">
        function video(url)
            a = window.open("#","win1","height=300,width=350")
            output = "<center><embed src = \"" + url + "\""
            output += "autostart=true"
            output += "></center>"
    Then, I link from the content page like this:
    <a href="#" onclick="video ('../BookContents/MediaContent/ProductionKerriganReading.wmv')">Windows Media Player</a>
    This works well, but what I want to do is add some kind of background color, or an image, or text to the new window while the video player is embeded.

    Since the "pop" code is on the master page, and the link is elsewhere, I can't seem to find the right place to handle the new window in code with out getting errors about having more than one head or title element. (I tried some inline html, but didn't work.)

    Any suggestions would be much appreciated!

  • #2
    Regular Coder
    Join Date
    Sep 2005
    Thanked 0 Times in 0 Posts
    Have you tried putting the <embed> inside a <div> and giving the <div> some styles...
            output = "<div style=\"height=300px; width=350px; background-color: black;\"><center><embed src = \"" + url + "\""
            output += "autostart=true"
            output += "></center></div>"
    If you want answers, write a smart question.

    Yes, someone probably does know how...

    Oh, and if you want to learn, STFW!


    Posting Permissions

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