Genius_Online
02-23-2009, 09:28 AM
Hello! I'm new in here, and also in web design..First, sorry on my English, it's suck's.. =)
Anyway, I have a Forum, and want to put on wmplayer that will pop out in new window,and also(on same link)pop up another window with google that will stay open ap. 5sec and auto-close (window with player staying opened)
I wrote something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Online Radio OK</title>
<script type="text/javascript">
function openPlayer(url)
{
musicwin = window.open('Online Radio OK.html','musicwin','width=315,height=70,top=0,left=0,status=0,resizable=0,menubar=0,toolbars=0');
musicwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
musicwin.document.write('\n<html xmlns="http://www.w3.org/1999/xhtml">');
musicwin.document.write('\n<head>');
musicwin.document.write('\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
musicwin.document.write('\n<title>Online Radio OK</title>');
musicwin.document.write('\n<style type="text/css">');
musicwin.document.write('\nhtml, body {');
musicwin.document.write('\nmargin:0;');
musicwin.document.write('\npadding:0;');
musicwin.document.write('\nborder:0;');
musicwin.document.write('\nbackground:#FFFFFF;');
musicwin.document.write('\ncolor:#FFF;');
musicwin.document.write('\n}');
musicwin.document.write('\n</style>');
musicwin.document.write('\n</head>');
musicwin.document.write('\n<body>');
musicwin.document.write('\n<div id="music">');
musicwin.document.write('\n<object width="315" height="70"');
musicwin.document.write('\n classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"');
musicwin.document.write('\n codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
musicwin.document.write('\n type="application/x-oleobject">');
musicwin.document.write('\n <param name="url" value="http://xx.xxx.xxx.xxx:xxxxx">');
musicwin.document.write('\n <param name="uiMode" value="full">');
musicwin.document.write('\n <param name="autoStart" value="true">');
musicwin.document.write('\n <param name="ShowDisplay" value="false">');
musicwin.document.write('\n <param name="ShowStatusBar" value="true">');
musicwin.document.write('\n <embed type="application/x-mplayer2"');
musicwin.document.write('\n pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"');
musicwin.document.write('\n showcontrols="true" uimode="full" width="315" height="70"');
musicwin.document.write('\n src="http://xx.xxx.xxx.xxx:xxxxx" autostart="1" ShowDisplay="0" ShowStatusBar="1">');
musicwin.document.write('\n</object>');
musicwin.document.write('\n</div>');
musicwin.document.write('\n</body>');
musicwin.document.write('\n</html>');
musicwin.document.close();
musicwin.focus();
}
</script>
</head>
<head>
<script type="text/javascript">
function open_win()
{
window.open('http://www.google.com','google','width=10,height=10,top=0,left=0,status=0,resizable=0,menubar=0,toolbars=0' );
}
</script>
</head>
<body>
<a href="Radio_OK.mp3" onclick="openPlayer(this.href);open_win();return false;"><FONT SIZE=2><FONT COLOR="#F00000"><BLINK><B>Click here and listen Online Radio OK</B></BLINK></FONT></FONT> </a>
</body>
</html>
But it doesn't closing window with google, but my 'parent' page.. I don't know what is wrong, so if someone can help me with this..
Thank's!
Anyway, I have a Forum, and want to put on wmplayer that will pop out in new window,and also(on same link)pop up another window with google that will stay open ap. 5sec and auto-close (window with player staying opened)
I wrote something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Online Radio OK</title>
<script type="text/javascript">
function openPlayer(url)
{
musicwin = window.open('Online Radio OK.html','musicwin','width=315,height=70,top=0,left=0,status=0,resizable=0,menubar=0,toolbars=0');
musicwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
musicwin.document.write('\n<html xmlns="http://www.w3.org/1999/xhtml">');
musicwin.document.write('\n<head>');
musicwin.document.write('\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
musicwin.document.write('\n<title>Online Radio OK</title>');
musicwin.document.write('\n<style type="text/css">');
musicwin.document.write('\nhtml, body {');
musicwin.document.write('\nmargin:0;');
musicwin.document.write('\npadding:0;');
musicwin.document.write('\nborder:0;');
musicwin.document.write('\nbackground:#FFFFFF;');
musicwin.document.write('\ncolor:#FFF;');
musicwin.document.write('\n}');
musicwin.document.write('\n</style>');
musicwin.document.write('\n</head>');
musicwin.document.write('\n<body>');
musicwin.document.write('\n<div id="music">');
musicwin.document.write('\n<object width="315" height="70"');
musicwin.document.write('\n classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"');
musicwin.document.write('\n codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
musicwin.document.write('\n type="application/x-oleobject">');
musicwin.document.write('\n <param name="url" value="http://xx.xxx.xxx.xxx:xxxxx">');
musicwin.document.write('\n <param name="uiMode" value="full">');
musicwin.document.write('\n <param name="autoStart" value="true">');
musicwin.document.write('\n <param name="ShowDisplay" value="false">');
musicwin.document.write('\n <param name="ShowStatusBar" value="true">');
musicwin.document.write('\n <embed type="application/x-mplayer2"');
musicwin.document.write('\n pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"');
musicwin.document.write('\n showcontrols="true" uimode="full" width="315" height="70"');
musicwin.document.write('\n src="http://xx.xxx.xxx.xxx:xxxxx" autostart="1" ShowDisplay="0" ShowStatusBar="1">');
musicwin.document.write('\n</object>');
musicwin.document.write('\n</div>');
musicwin.document.write('\n</body>');
musicwin.document.write('\n</html>');
musicwin.document.close();
musicwin.focus();
}
</script>
</head>
<head>
<script type="text/javascript">
function open_win()
{
window.open('http://www.google.com','google','width=10,height=10,top=0,left=0,status=0,resizable=0,menubar=0,toolbars=0' );
}
</script>
</head>
<body>
<a href="Radio_OK.mp3" onclick="openPlayer(this.href);open_win();return false;"><FONT SIZE=2><FONT COLOR="#F00000"><BLINK><B>Click here and listen Online Radio OK</B></BLINK></FONT></FONT> </a>
</body>
</html>
But it doesn't closing window with google, but my 'parent' page.. I don't know what is wrong, so if someone can help me with this..
Thank's!