Please support our HTML and CSS advertiser: Lunarpages Web Hosting
![]() |
•
•
Join Date: Dec 2007
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
This is the solution I put together. A link from my menu that calls a JavaScript file to build the popup window, and then a call from the script to load the HTML. (I made a quick attempt to edit out irrelevant portions of the HTML file)
The link:
<a onclick="javascript:showMedia();return false" />Paint Removal Demo</a>
The JS file:
unction showMedia(){
var width = 600;
var height = 400;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open('external/paintRemovalDemo.html','media01', params);
if (window.focus){
newwin.focus();
}
return false;
The HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Paint Removal Demo</title>
</head>
<script type="text/javascript" src="JavaScript/media.js"></script>
<body>
<CENTER>
<div id="video">
<OBJECT ID="MediaPlayer2" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="400" height="320">
<PARAM NAME="URL" VALUE="../video/PaintRemoval.wmv">
<PARAM NAME="ClickToPlay" VALUE="TRUE">
<PARAM NAME="AutoStart" VALUE="FALSE">
<PARAM NAME="ShowControls" VALUE="TRUE">
<PARAM NAME="ShowDisplay" VALUE="FALSE">
<PARAM NAME="ShowStatusBar" VALUE="FALSE">
<embed TYPE="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"
filename="../video/PaintRemoval.wmv" SRC="../video/PaintRemoval.wmv" Name=MediaPlayer2
ClickToPlay=1 AutoStart=0 ShowControls=1 ShowDisplay=0 ShowStatusBar=0
controls="PlayButton" width=400 height=320>
</embed>
</OBJECT>
</div>
</CENTER>
<CENTER>
<FORM><INPUT type="button" value="Close Window"
onClick="window.close()"></FORM>
</CENTER>
</body>
</html>
Hope this helps someone.
WBR
The link:
<a onclick="javascript:showMedia();return false" />Paint Removal Demo</a>
The JS file:
unction showMedia(){
var width = 600;
var height = 400;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open('external/paintRemovalDemo.html','media01', params);
if (window.focus){
newwin.focus();
}
return false;
The HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Paint Removal Demo</title>
</head>
<script type="text/javascript" src="JavaScript/media.js"></script>
<body>
<CENTER>
<div id="video">
<OBJECT ID="MediaPlayer2" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="400" height="320">
<PARAM NAME="URL" VALUE="../video/PaintRemoval.wmv">
<PARAM NAME="ClickToPlay" VALUE="TRUE">
<PARAM NAME="AutoStart" VALUE="FALSE">
<PARAM NAME="ShowControls" VALUE="TRUE">
<PARAM NAME="ShowDisplay" VALUE="FALSE">
<PARAM NAME="ShowStatusBar" VALUE="FALSE">
<embed TYPE="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"
filename="../video/PaintRemoval.wmv" SRC="../video/PaintRemoval.wmv" Name=MediaPlayer2
ClickToPlay=1 AutoStart=0 ShowControls=1 ShowDisplay=0 ShowStatusBar=0
controls="PlayButton" width=400 height=320>
</embed>
</OBJECT>
</div>
</CENTER>
<CENTER>
<FORM><INPUT type="button" value="Close Window"
onClick="window.close()"></FORM>
</CENTER>
</body>
</html>
Hope this helps someone.
WBR
![]() |
Similar Threads
Other Threads in the HTML and CSS Forum
- Windows Media Player Toolbar/Skin (Windows Software)
- Despite use of Firefox, IE pop-ups still abundant (Viruses, Spyware and other Nasties)
- OOO-Microsoft Internet Explorer Pop up (Viruses, Spyware and other Nasties)
- I can't open windows media player (Viruses, Spyware and other Nasties)
- HELP! Urllogic Pop-up (Viruses, Spyware and other Nasties)
- Help! - Hijack log but i need to know what to delete (Viruses, Spyware and other Nasties)
- pop up virus? (Viruses, Spyware and other Nasties)
- pop ups wont stop (Web Browsers)
Other Threads in the HTML and CSS Forum
- Previous Thread: file handling in html and jsp
- Next Thread: nav bar disappearing/reappearing?
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode