473,698 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embedded WMP stops playing

I have a Windows Media Player control embedded in my page. This is the
code I use to get it to play:

function setPlayerURL()
{
player = document.getEle mentById("wmpWi ndow");
myURL =
document.getEle mentById("pathS tore").getAttri bute("value");
player.URL = myURL;
alert(player.UR L);
}
I used the alert to debug. I could not get it to work at all, until I
realized that the control DOES play the video WHILE the alert is open.
As soon as you click OK on the alert, the video stops and cannot be
played again.
I used another function to determine what the URL of the player is at
the moment that you click another button. That alert comes up blank.
This is my code for the player:

<object id="wmpWindow" width="400" height="300"
classid="CLSID: 6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="applicati on/x-oleobject" >
<param name="uiMode" value="full" />
<param name="AutoStart " value="true" />
</object>

It seems like after the Javascript function finishes, the page
refreshes and set the URL to "".
Why is this happening?

Apr 27 '07 #1
2 1386
most likely you tied the javascript to a control that posts back.

-- bruce (sqlwork.com)

gsauns wrote:
I have a Windows Media Player control embedded in my page. This is the
code I use to get it to play:

function setPlayerURL()
{
player = document.getEle mentById("wmpWi ndow");
myURL =
document.getEle mentById("pathS tore").getAttri bute("value");
player.URL = myURL;
alert(player.UR L);
}
I used the alert to debug. I could not get it to work at all, until I
realized that the control DOES play the video WHILE the alert is open.
As soon as you click OK on the alert, the video stops and cannot be
played again.
I used another function to determine what the URL of the player is at
the moment that you click another button. That alert comes up blank.
This is my code for the player:

<object id="wmpWindow" width="400" height="300"
classid="CLSID: 6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="applicati on/x-oleobject" >
<param name="uiMode" value="full" />
<param name="AutoStart " value="true" />
</object>

It seems like after the Javascript function finishes, the page
refreshes and set the URL to "".
Why is this happening?
Apr 27 '07 #2
So I needed it to a control that doesn't post back... I changed my
button to an HTML control instead of an ASP control, and that fixed
it. Thank you.
Apr 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2884
by: Damien Renwick | last post by:
I have a php script which simply stops midway through a while loop that processes records returned by a MySQL query. The HTML page continues trying to load the page but the php has stopped running and eventually I get a timeout. The script is running in my development environment which consists of php 4.3.4, Apache 1.3.28 and MySQL 4.0.17, installed on Windows XP with Service Pack 2. I suspect that there may be a problem with my...
3
9884
by: craig | last post by:
i want to make a button that will start an embedded windows media player playing AND in full screen. i can do it with TWO buttons: <input onclick="MediaPlayer.controls.play();" type="button" size="22" value="Play"> <INPUT type = "button"
2
2522
by: fotis | last post by:
hello there! I am playing with embedded python these days. I wrote sth like this: ------------------------------ Code ------------------------------- #include <Python.h> #include <iostream> #include <cmath> /* Return the square root of an argument */ static PyObject* Fotis_root(PyObject *self, PyObject *args)
26
10805
by: jini us | last post by:
Hi, I am starting a new project where I intend to use embedded database server in my win32 application. I intend to use VC++ microsoft studio 6.0 as my development environment. The postgres.org website seems to be catering for people with all sorts of requirements and platforms.
14
2344
by: askMe | last post by:
I developed a web page that plays an mpg using the simple embed tag. When the page loads, the video starts, but then stops after a few seconds. I use the embed tag because I want the user's default player to kick in. What might be causing the video to start then stop? Thanks. http://www.askblax.com
2
8165
by: Owen.Leibman | last post by:
Here is a complete web page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <title>Javascript Embed and onunload</title> <script type="text/javascript"> function useplayer() { var a = document.getElementById("obj1"); var obj = document.createElement("object"); obj.data = "dayenu.mid";
6
5692
by: xhunter | last post by:
I have this problem on my website and no matter what I have not been able to get over it, it is really getting on my nervers. it's a problem that only exists in non IE browsers. the frame work of my website is php and lets say here is how the player is shown with very simple syntaxes: <OBJECT id="VIDEO" width="'.$x.'" height="'.($y+60).'" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> <param...
1
2121
by: josephChiaWY | last post by:
Hi all, Recently, i have met a problem in playing the selected video in the embedded quicktime player. I am creating a video gallery for people to view their .mov file on quicktime player. Below are parts of my code: if($ext=="mov"){ echo "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width=320 height=240 standby='Data is loading...' codebase='http://www.apple.com/qtactivex/qtplugin.cab'> <param name=src...
20
2040
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: memset(data,-1,sizeof data)
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.