I need to fix my Java script to open a new window and if clicked again it brings the existing open window to the front

I need to make my java script and html link open the linked "tom.html" page in a new window. The java script is set to bring an opened "tom.html" window to the front if clicked again. But I can't seem to get the script to open the "tom.html" file into a new window.

I also need to remove the new window's resize, menu, tools, status, scroll of the newly opened "tom.html" window if it is possible to accomplish with thie java script.

Thanks
<!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=utf-8" />
		<title>ee</title>
		<link href="css/basic.css" type="text/css" rel="stylesheet" media="all" />
	</head>
 
	<body bgcolor="black">
		<p>
			<script>
    function activate(w) {
      win=window.open("tom.html",w); window.resizeTo(294, 104); // get a handler for the window, old or new
      win.focus();           // BRING TO FRONT
    }
    if (window.name=="") window.name="Master"; //name for nameless window
  </script>
			<a href="tom.html" target="child" onclick="activate('child')"><span class="UpperNav">Music by Tom</span></a></p>
	</body>
 
</html>

Open in new window

LVL 2
MichaelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
Try this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!-- http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23149594.html -->
<html xmlns="http://www.w3.org/1999/xhtml">
 
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<title>ee</title>
		<link href="css/basic.css" type="text/css" rel="stylesheet" media="all" />
	</head>
 
	<body bgcolor="black">
 
			<script type="text/javascript">
var win = null;//handle to new window
function activate(w)
{
    	if(win && win.closed==false)
    	{
		win.focus();
	}
	else
	{
     	win=window.open("tom.html",'win','height=104,width=294,status=yes,toolbar=no'); 
 
		//win.resizeTo(294, 104); // get a handler for the window, old or new
     	win.focus();           // BRING TO FRONT
	}
return false;
}
    if (window.name=="") window.name="Master"; //name for nameless window
  </script>
			<p><a href="tom.html" target="child" onclick="return activate('child');"><span class="UpperNav">Music by Tom</span></a></p>
	</body>
 
</html>

Open in new window

0
thirdCommented:
I suggest you use this method

http://www.quirksmode.org/js/croswin.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MichaelAuthor Commented:
Thanks for the help!!! The music player pop up window is working great!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.