Welcome to WebmasterWorld Guest from 54.198.77.172

Forum Moderators: open

Message Too Old, No Replies

open new windows with onload ()

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

Full Member

10+ Year Member

joined:May 25, 2006
posts:237
votes: 12


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!
3:15 am on Mar 19, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
posts:1585
votes: 0


PopUp blocker may be blocking unsolicited window openings ?