Forum Moderators: open
<HEAD>
<TITLE>Play Movie Page</TITLE>
<SCRIPT language="JavaScript">
<!--
//get the parameter passed with the page.
var movieName = location.search.substring(1).toString();
var pageText = "";
var movieVar = "";//array of the quicktime movies
var movies = new Array(2);
movies[0] = "quicktimes/movie0.mov";
movies[1] = "quicktimes/movie1.mov";
switch(movieName) {
case 'firstMovie':
pageText = "This is movie 1.";
document.title = "First Movie!";
movieVar = movies[0];
break;
case 'secondMovie':
pageText = "This is the movie 2.";
document.title = "Second Movie!";
movieVar = movies[1];
break;
}
-->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT language="JavaScript">document.write(pageText);</SCRIPT>
<br>
<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
[b]<PARAM name="SRC" VALUE='movieVar'>[/b]
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM name="CONTROLLER" VALUE="true">
<EMBED [b]SRC='movieVar'[/b] WIDTH="320" HEIGHT="256" AUTOPLAY="true" CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>
</object>
</BODY>
<PARAM name="SRC" VALUE='movieVar'>
<EMBED SRC='movieVar'...>
You can't simply call a Javascript variable inside your HTML; you'll need to have it written by Javascript. So, try this:
<PARAM name="SRC" VALUE='<script>document.write(movieVar)</script>'>
<EMBED SRC='<script>document.write(movieVar)</script>'...>
Welcome to WebmasterWorld, thunter.