homepage Welcome to WebmasterWorld Guest from 50.19.206.49
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
open new windows with onload ()
Rasputin




msg:4555988
 7:02 am on Mar 18, 2013 (gmt 0)

I am having a problem getting new windows opened wnen triggered by onload ()...using

<head><script>
function open_win()
{
window.open("http://www.google.com");
window.open("http://www.bing.com");
}
</script>
</head>
<body onload="open_win()">
<input type="button" value="Open Windows" onclick="open_win()">
</body>


The button works ok to open the two windows, but I can't get onload() in <body> to do the same thing. Am I missing something obvious?

Thanks!

 

daveVk




msg:4556296
 3:15 am on Mar 19, 2013 (gmt 0)

PopUp blocker may be blocking unsolicited window openings ?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved