![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am attempting to embed a WMP object in a web page using VB.net. The following code works in a straight html page, but gives a "Microsoft JScript runtime error: 'Player1' is undefined" error when the button is clicked. Can any one tell me what I am doing wrong? body MS_POSITIONING="GridLayout" form id="Form1" method="post" runat="server" OBJECT id="Player1" height="300" width="300" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT PARAM NAME="URL" VALUE="video/TimeCodeTest.wmv" /OBJECT INPUT type="button" value="Button" onclick="goTime();" script function goTime(){ Player1.controls.currentPosition = '90'; } /script /form /body /HTML Thanks ! |
#3
| |||
| |||
|
|
The problem is that the WMP is inside the form tag, and as such must be reffered to in the javascript as document.forms[0].player1 "Eveready" wrote: Hello, I am attempting to embed a WMP object in a web page using VB.net. The following code works in a straight html page, but gives a "Microsoft JScript runtime error: 'Player1' is undefined" error when the button is clicked. Can any one tell me what I am doing wrong? body MS_POSITIONING="GridLayout" form id="Form1" method="post" runat="server" OBJECT id="Player1" height="300" width="300" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT PARAM NAME="URL" VALUE="video/TimeCodeTest.wmv" /OBJECT INPUT type="button" value="Button" onclick="goTime();" script function goTime(){ Player1.controls.currentPosition = '90'; } /script /form /body /HTML Thanks ! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |