Jump to content

Programmically Assigning Values To An Object <param> Value


Guest fran

Recommended Posts

on the load of the webpage i have a vb function that grabs the querystring that holds the path to the video, which will change values each time it's loaded. I need then to be able to use that string to set the path to the video file that is to be used by the embedded media player.this is where I get the file path and assign it to the variable vid

<script runat="server">	Dim vid, ext As String	Sub page_load()				vid = Request.QueryString("title")				ext = vid.Substring(vid.Length - 3, 3)		If ext.ToLower.Equals("mp4") Then		Else			Response.Redirect(vid)		End If			End Sub	</script>

I then need to be able to use it in the html body

<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 Windows® Media Player components..." type="application/x-oleobject" width="400" height="400"><param name="fileName"  value="vid"><param name="animationatStart" value="true"><param name="transparentatStart" value="true"><param name="autoStart" value="true"><param name="showControls" value="true"><param name="Volume" value="-450"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="vid" name="MediaPlayer1" width="400" height="400" autostart="1" showcontrols="1" volume=-450></object>

so I need to use vid = Request.QueryString("title") to set the value of <param name="fileName" value="vid">

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...