Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Controling WMP object

    i have an object

    PHP Code:
    <object
      id
    ="mediaPlayer"
      
    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=""value is here.mp3" />
              <param name="
    animationatStart" value="true" />
              <param name="
    transparentatStart" value="true" />
              <param name="
    autoStart" value="true" />
              <param name="
    showControls" value="true" />
            </object> 
    I want to know how i would get the value of the param "fileName"

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script type="text/javascript">
    function getParamVal(what)
    {
    	var params = document.getElementById('mediaPlayer').getElementsByTagName('param');
    	for(var i = 0; i < params.length; i++)
    	{
    		if(params[i].getAttribute('name') == what)
    		{
    			alert(params[i].getAttribute('value'));
    		}
    	}
    }
    window.onload = function()
    {
    	getParamVal('fileName');
    }
    </script>
    </head>
    <body>
    <object id="mediaPlayer" 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="value is here.mp3">
    	<param name="animationatStart" value="true">
    	<param name="transparentatStart" value="true">
    	<param name="autoStart" value="true">
    	<param name="showControls" value="true">
    </object>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Sep 2006
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    thanx that helped
    Last edited by Alphamonkey; 01-31-2007 at 03:11 AM.


  •  

    Posting Permissions

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