Mar 19th, 2005, 12:59 AM
#1
Thread Starter
Hyperactive Member
[Resolved] Windows Media Player on web
Hi,
I have created Windows Media Player on my site.
<OBJECT style="Z-INDEX: 101; LEFT: 224px; POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
<PARAM NAME="URL" VALUE="">
<PARAM NAME="volume" VALUE="50">
</OBJECT>
It works fine.
But how to change url of Windows Media Player when user selected a url from combo box?
code below is invalid how to correct this code?
<script runat="server">
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
A.URL="XXXX";
}
</script>
May someone give me an idea?
Thanks for advance
Last edited by naruponk; Mar 23rd, 2005 at 07:36 AM .
Mar 20th, 2005, 04:41 AM
#2
Re: Windows Media Player on web
Code:
<OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px; POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
then use client side javascript, call it in the OnChange event of the dropdown:
PHP Code:
wmpobj . URL = "file7.wmv" ;
Mar 20th, 2005, 09:29 PM
#3
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
Thanks mendhak.
Below is a code that i have edited from a code you gave me.
I still got an error, what's wrong of my code?
can you help me to correct this code, if it work then I can do more my self
VB Code:
<HTML>
<script language="VB">
sub Submit_Click()
wmpobj.URL="D:\Songs\mangosteen_low.wav";
end sub
</script>
<body>
<input name="Submit" type="submit" id="Submit" value="Submit" >
<OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
</body>
</HTML>
Thanks
Last edited by naruponk; Mar 21st, 2005 at 05:14 AM .
Mar 21st, 2005, 05:14 AM
#4
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
Attention of above:
This code was generated on dreamweaver and have no codebehind yet.
Do I need code behind file?
Last edited by naruponk; Mar 21st, 2005 at 05:29 AM .
Mar 21st, 2005, 05:42 AM
#5
Re: Windows Media Player on web
<script language="VBSCRIPT ">
Mar 21st, 2005, 06:29 AM
#6
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
I have changed to VBScript.
Once I run and press a button IE's statusbar shows "Error on page"
Do you think what is problem of my code?
Have you ever try to send a parameter from an aspx to ActiveX?
If so, how is a result and which script language you used?
Thanks mendhak
Last edited by naruponk; Mar 21st, 2005 at 06:38 AM .
Mar 21st, 2005, 07:17 AM
#7
Re: Windows Media Player on web
What's the error? (Double click it)
Mar 21st, 2005, 10:01 PM
#8
Thread Starter
Hyperactive Member
Mar 22nd, 2005, 02:08 AM
#9
Re: Windows Media Player on web
Mar 22nd, 2005, 02:59 AM
#10
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
This a code in that aspx page
VB Code:
<HTML>
<script language="VBScript">
sub Submit_Click()
wmpobj.URL="D:\Songs\mangosteen_low.wmv";
end sub
</script>
<body>
<input name="Submit" type="submit" id="Submit" value="Submit" >
<OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
</body>
</HTML>
Attached Images
Mar 22nd, 2005, 03:27 AM
#11
Re: Windows Media Player on web
Originally Posted by
naruponk
This a code in that aspx page
VB Code:
<HTML>
<script language="VBScript">
sub Submit_Click()
wmpobj.URL="D:\Songs\mangosteen_low.wmv"[color=#CC0000];[/color]
end sub
</script>
<body>
<input name="Submit" type="submit" id="Submit" value="Submit" >
<OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
</body>
</HTML>
Try removing the semicolon.
Mar 22nd, 2005, 04:11 AM
#12
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
No error , but nothing happen (doesnt work) even i changed the command in
Submit_Click() to Msgbox ("Test"). why i cant access an events?
Thanks
Mar 22nd, 2005, 04:41 AM
#13
Re: Windows Media Player on web
Let's try something else:
Code:
<HTML>
<script language="JavaScript">
function PlayIt()
{
wmpobj.URL="D:\Songs\mangosteen_low.wmv";
wmpobj.controls.play();
}
</script>
<body>
<input name="Submit" type="button" id="Submit" value="Submit" onClick="PlayIt();">
<OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
</body>
</HTML>
Mar 22nd, 2005, 07:30 AM
#14
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
Thanks man, works fine!
Can i do like this with others ActiveX?
Mar 22nd, 2005, 07:44 AM
#15
Re: Windows Media Player on web
Mar 22nd, 2005, 10:01 PM
#16
Thread Starter
Hyperactive Member
Re: Windows Media Player on web
Thanks a lot for your help
Last edited by naruponk; Mar 23rd, 2005 at 07:37 AM .
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width