/    Sign up×
Community /Pin to ProfileBookmark

opening two popups automatically

this is my current code for index.htm,
it opens home.htm in the main window.
i wish to add code in here to automatically open 2 popups
displaying 1.jpg and 2.jpg with titles.

pls advice ?

<HTML>
<HEAD><TITLE>PurpleTequila.com</TITLE></HEAD>

<FRAMESET>
<FRAME src=home.htm>
</FRAMESET>

</body>
</HTML>

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@PittimannJan 13.2004 — Hi!

Why are you using a frameset document containing a single frame?? You better leave the frameset document out and rename your home.htm to index.htm (if necessary on your webspace).

Whatever you do: the code for opening the popups has to be inside the document which is your home.htm at present.

Apart from that "technical" stuff, you should consider the fact, that many users don't like a bunch of windows popping up, when they go to a site...

Cheers - Pit
Copy linkTweet thisAlerts:
@zerohertzauthorJan 13.2004 — [i]Originally posted by Pittimann [/i]

[B]Hi!

[/B]
[/QUOTE]


Why are you using a frameset document containing a single frame?? You better leave the frameset document out and rename your home.htm to index.htm (if necessary on your webspace).[/QUOTE]

is there any danger using a frameset document containing a single frame?? you sound as if there is..

anyway i'm doing that because i started designing the website with home.htm and all the links point to here.. i'm using fireworks and dreamweaver and flash, it's alot of hassle converting home.htm to index.htm. anyway i'll do it when i got the time.. ?

Whatever you do: the code for opening the popups has to be inside the document which is your home.htm at present.[/QUOTE]

i figured that too, the question is : is it possible to have two popups from a single html document? home.htm

Apart from that "technical" stuff, you should consider the fact, that many users don't like a bunch of windows popping up, when they go to a site...[/QUOTE]

websites of my business.. everyone is doing it.. and the viewers love it.. cos it means there are upcoming parties!

anyway.. i've decided to make a little flash animation and manual popups to replace the auto-popups.. ?

THANKS!
Copy linkTweet thisAlerts:
@PittimannJan 13.2004 — Hi!

To deal with a frameset like that is not at all dangerous, but it is recommended to use other ways for page layout than frames (CSS!).

Very likely you could use your home.htm as it is, most webspaces would deal with home.htm without a problem and do not require index.htm

To come back to your question - it is possible:

<body onload="window.open();window.open()">

Just specify the window parameters for the two popups (url, name, window properties) and there you are.

Cheers - Pit
Copy linkTweet thisAlerts:
@zerohertzauthorJan 13.2004 — [i]Originally posted by Pittimann [/i]

[B]Hi!



To deal with a frameset like that is not at all dangerous, but it is recommended to use other ways for page layout than frames (CSS!).



Very likely you could use your home.htm as it is, most webspaces would deal with home.htm without a problem and do not require index.htm



To come back to your question - it is possible:



<body onload="window.open();window.open()">



Just specify the window parameters for the two popups (url, name, window properties) and there you are.



Cheers - Pit [/B]
[/QUOTE]


i tried deleting index.htm and sure enuff home.htm loads automatically too! ? but i'm still keeping index.htm becos it allows for the title to be displayed and fixed.

if i delete index.htm, the title of each window is displayed as defined in the html <title></title> . and these titles are generated automatically by fireworks each time i make changes and export to html. too troublesome to make sure i remember to use dreamweaver/notepad to edit it.. let index.htm do the job.. ?

thanks for the double popup command! so it's just a semicolon to do the trick!

:eek:
Copy linkTweet thisAlerts:
@PittimannJan 13.2004 — Hi!thanks for the double popup command! so it's just a semicolon to do the trick! [/QUOTE]
That was of course a very short statement of mine, putting this into the onload of the body.

To have more complex stuff (defining variables, parameters etc. for the popups) you can easily call a function with body onload=functionXY() and put all your code there.

You can then define everything for your two popups individually.

Btw. - ...everyone is doing it.. and the viewers love it..[/QUOTE] I don't love it! But that doesn't mean anything against you :p!

Cheers - Pit
×

Success!

Help @zerohertz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...