Hi,
I am trying to launch a windows media player file and change the page
in the window browser when a user clicks on a link in a web page.
Specifically, when the link is clicked on a web page:
1. the window in the web browser that you are in loads a new page, and
2. windows media player plays the file.
I have learned enough about javascript in the last couple hours to do it in
a way that creates an extra window that will annoy and possibly
confuse people, but no way to do it so that the only window is the
original browser window.
This code inserted into the body of an html page, will do everything I
want but creats the extra window.
<a href="://www.google.com"
ONCLICK="window.open('mms://wm.newmediamill.speedera.net/wm.newmediamill/animate.wmv',
'NewWindow','toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=yes,width=200,height=200')">Link
description</a>
It loads Google into the browser window that you are in and launches
the animated movie. It however also opens an unnecessary window.
Since, I only found the "window.open" function to launch the file, it
obviously creates an extra window.
Ideally, this would happen from just the HREF in the HTML similarly to
the code I created above as I might now have access to the <head>
</head> area in this content management system. But, if there is no
other way to do it I am sure I will be able to find a work around to
get access to the header.
If we could close the little window automatically without a prompt to
the user, this would be ok. But, my understanding is that browsers
always asks a user if it is ok to close the window when a script
attempts to close a window.
This answer should work in most recent versions of Mozilla, Netscape and IE.
Hopefully, this is very simple. I am desperate for an answer today,
2/25, and can't think or work on it anymore. |