onload new browser window

hello, I'm trying to open a new browser window when a web page is requested. see my code below. Currently, the page just performs a redirect in the same tab under ie8. how do i get this to work?
<html>
<head>
<title></title>
 
<SCRIPT language="JavaScript1.2">
function poponload()
{
testwindow= window.open ("http://www.google.com");
}
</SCRIPT>
</head>
<body onload="javascript: poponload()">
 
my page - new browser will open onload
 
</body>
</html>

Open in new window

fwstealerAsked:
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.

middela1903Commented:
Try this.

<html>
<head>
<title></title>
 
<SCRIPT language="JavaScript1.2">
function poponload()
{
testwindow= window.open ("http://www.google.com", "New Window");
}
</SCRIPT>
</head>
<body onload="javascript: poponload()">
 
my page - new browser will open onload
 
</body>
</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
fwstealerAuthor Commented:
still does a redirect - what is going on?
0
fwstealerAuthor Commented:
error on page:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30618)
Timestamp: Wed, 27 May 2009 16:24:25 UTC

Message: Invalid argument.
Line: 8
Char: 1
Code: 0

0
carachoCommented:
Hi fwstealer:

Would you like to test this?

I changed
   <SCRIPT language="JavaScript1.2">
instead of
    <script type="text/javascript">

And some spaces:
  "open("
instead of
  "open ("

Try changing
  <body onload="javascript:poponload()">
for
  <body onload="poponload()">
  <body onload="poponload">
Please comment what happened

Regards,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <script type="text/javascript">
function poponload()
    {
    testwindow = window.open("http://www.google.com");
    }
    </script>
  </head>
  <body onload="javascript:poponload()">
    my page - new browser will open onload
  </body>
</html>

Open in new window

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.