building a window from user data

wxdqz

New Member
my goal is to build a generic popup window which will play one of 30 movie files. i want the user to click on their choice and the movie play in a popup. the code i have for the window building itself works but im hung up on how to pass the info from the user click into the html of the window im building so the appropriate movie plays. that filename goes in 2 places in the window (i have 2 plus signs "++" there for now).

should i be thinking array?

any help would be very cool. im braindead. ill put my code below this.
thanks

<html>
<head>
<SCRIPT language="javascript">

function openmovie() {
var OpenWindow=window.open("","newwin","height=380,width=400");
OpenWindow.document.write("<html>")
OpenWindow.document.write("<head>")
OpenWindow.document.write("<title></title>")
OpenWindow.document.write("</head>")
OpenWindow.document.write("<body bgcolor='#1A304D' link='#FFFFFF' vlink='#FFFFFF' alink='#FFFFFF' topmargin='10' text='#FFFFFF'>")
OpenWindow.document.write("<center>")
OpenWindow.document.write("<OBJECT ID='MediaPlayer1' 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 Windowsr Media Player components...' type='application/x-oleobject'>")
OpenWindow.document.write("<PARAM NAME='AutoStart' VALUE='http://www.webdeveloper.com/forum/archive/index.php/True'>")
OpenWindow.document.write("<PARAM NAME='FileName'")
OpenWindow.document.write(" VALUE='http://www.webdeveloper.com/forum/archive/index.php/++'><PARAM NAME='ShowControls' VALUE='http://www.webdeveloper.com/forum/archive/index.php/True'><PARAM NAME='ShowStatusBar' VALUE='http://www.webdeveloper.com/forum/archive/index.php/True'>")
OpenWindow.document.write("<EMBED type='application/x-mplayer2'")
OpenWindow.document.write(" pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'")
OpenWindow.document.write(" SRC='http://www.webdeveloper.com/forum/archive/index.php/++'")
OpenWindow.document.write(" name='MediaPlayer1'")
OpenWindow.document.write(" width=320")
OpenWindow.document.write(" height=240")
OpenWindow.document.write(" autostart=1")
OpenWindow.document.write(" showcontrols=1")
OpenWindow.document.write(" statusbar=1>")
OpenWindow.document.write("</EMBED></OBJECT>")
OpenWindow.document.write("<br><br>")
OpenWindow.document.write("<a href='' onClick='self.close()'>Close Window</a>")
OpenWindow.document.write("</center>")
OpenWindow.document.write("</body>")
OpenWindow.document.write("</html>")
}
</SCRIPT>
</head>
<body>
<a href='' onClick="openmovie()">217</a><br>
<a href='' onClick="openmovie()">218</a><br>
</body>
</html>
 
Back
Top