SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast TheNinthPlayer's Avatar
    Join Date
    Jan 2004
    Location
    USA
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript & Windows Media Player

    I found an example on the WMP SDK that got me started but now I've hit a brick wall.

    Here is my code
    Code:
    <!--
    // Functions
    function minMax() {
      alert(document.getElementById("test").value);
      document.getElementById("test").value="false";
      alert(document.getElementById("test").value);
    }
    
    // HTML & CSS
    document.write("<style type=\"text/css\">");
    document.write("  #music {text-align: center;}");
    document.write("</style>");
    document.write("<div id=\"music\">");
    document.write("  <fieldset>");
    document.write("    <legend><img onclick=\"minMax();\" src=\"./images/music.gif\" alt=\"\" /><span class=\"titles\">&nbsp;Music&nbsp;</span></legend>");
    document.write("      <object width=\"336\" height=\"143\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" id=\"mediaplayer1\">");
    document.write("        <param id=\"test\" name=\"Filename\" value=\"Playlist1.wpl\">");
    document.write("        <param name=\"AutoStart\" value=\"False\">");
    document.write("        <param name=\"ShowControls\" value=\"True\">");
    document.write("        <param name=\"ShowDisplay\" value=\"True\">");
    document.write("        <param id=\"test\" name=\"ShowStatusBar\" value=\"True\">");
    document.write("        <param name=\"AutoRewind\" value=\"True\">");
    document.write("      </object>");
    document.write("  </fieldset>");
    document.write("</div>");
    //-->
    If you run this JS in ur browser you will see it properly loads but clicking the icon which activates the scripted WILL change the value of the WMP parameter but the WMP will not update upon that chagne. Any Ideas?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That code doesnt show me anything in my browser...

    I've done a few web radios now. What are you trying to do?

  3. #3
    SitePoint Enthusiast TheNinthPlayer's Avatar
    Join Date
    Jan 2004
    Location
    USA
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want JavaScript to dynamicly effect the Windows Media Player. If a person click on the image I want it to hide the WMP Status Bar. The reason that code probably didnt work is because I didnt include the nessacary HTML elements to define it as a javascript.


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
  •