Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Open new window on page load without clicking a link
Old 03-23-2009, 11:35 AM Open new window on page load without clicking a link
Average Talker

Posts: 15
Trades: 0
I need to open a new page when another one loads. For example, when you load home.html I need another new window to load login.html without clicking a link. Possible?? THANKS!!!
LexieMSU08 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2009, 11:45 AM Re: Open new window on page load without clicking a link
Average Talker

Posts: 17
Name: Dejan
Location: Macedonia
Trades: 0
try this

Code:
<html>
<head>
<script type="text/javascript">
function new()
{
window.open("http://example")
}
</script>
</head>

<body onload="new()">
</body>

</html>
DeJaaaN is offline
Reply With Quote
View Public Profile Visit DeJaaaN's homepage!
 
Old 03-23-2009, 11:58 AM Re: Open new window on page load without clicking a link
Average Talker

Posts: 15
Trades: 0
That didn't work. Thanks tho!
LexieMSU08 is offline
Reply With Quote
View Public Profile
 
Old 03-23-2009, 11:59 AM Re: Open new window on page load without clicking a link
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
It won't work, because browser generally disable the window.open() call when it's not triggered by a click event.

Look for DOM replacement to window.open(), or better yet, forget about popups.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-23-2009, 12:13 PM Re: Open new window on page load without clicking a link
Average Talker

Posts: 17
Name: Dejan
Location: Macedonia
Trades: 0
you can use something like http://mjijackson.com/shadowbox/ too
DeJaaaN is offline
Reply With Quote
View Public Profile Visit DeJaaaN's homepage!
 
Old 03-24-2009, 10:44 AM Re: Open new window on page load without clicking a link
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And I wrote this where you can put whatever you want in the "popup"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Open new window on page load without clicking a link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.24371 seconds with 12 queries