F
fuzzylogic
I have a js function to derive the root of my file and append a folder
name '/slides/' onto it:
function rootpathstring () {
var myPath = document.URL
var rootpathend = new String (document.URL.lastIndexOf('\/'));
var rootpath = new String (myPath.substr(0, rootpathend) +
'/slides/');
//window.alert ('rootpath = ' +rootpath);
}
I want to pass the value of the variable, rootpath, to the Base ULR
value inside of the Windows Media Player object tag. Typically the
BaseURL value is hardcoded as seen here:
<param name="BaseURL"
value="http://videowm.boeing.com/stlcs/66757_smp4/slides/" ref
valuetype="ref">
I would like to do something like this instead:
<param name="BaseURL" value=rootpath ref valuetype="ref">
But the above script does not work. I don't know how to get the value
to pass. I'm not even sure if it is possible to do this. Please forgive
my ignorance on this. I know this is not the right approach. Is there a
solution?
Here is an abbreviated version of the htm file and object tag with just
the one <param> I need:
<html>
<head>
<script language="javascript1.2" type="text/javascript"
src="rootpath.js"></script>
</head>
<body onLoad="rootpathstring();">
<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
id="MediaPlayer1" width="320" height="285" hspace="0" codebase=
"http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Windows Media Player components..."
type="application/x-oleobject">
<param name="BaseURL" value=rootpath ref valuetype="ref">
</object>
</body>
</html>
name '/slides/' onto it:
function rootpathstring () {
var myPath = document.URL
var rootpathend = new String (document.URL.lastIndexOf('\/'));
var rootpath = new String (myPath.substr(0, rootpathend) +
'/slides/');
//window.alert ('rootpath = ' +rootpath);
}
I want to pass the value of the variable, rootpath, to the Base ULR
value inside of the Windows Media Player object tag. Typically the
BaseURL value is hardcoded as seen here:
<param name="BaseURL"
value="http://videowm.boeing.com/stlcs/66757_smp4/slides/" ref
valuetype="ref">
I would like to do something like this instead:
<param name="BaseURL" value=rootpath ref valuetype="ref">
But the above script does not work. I don't know how to get the value
to pass. I'm not even sure if it is possible to do this. Please forgive
my ignorance on this. I know this is not the right approach. Is there a
solution?
Here is an abbreviated version of the htm file and object tag with just
the one <param> I need:
<html>
<head>
<script language="javascript1.2" type="text/javascript"
src="rootpath.js"></script>
</head>
<body onLoad="rootpathstring();">
<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
id="MediaPlayer1" width="320" height="285" hspace="0" codebase=
"http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Windows Media Player components..."
type="application/x-oleobject">
<param name="BaseURL" value=rootpath ref valuetype="ref">
</object>
</body>
</html>