PDA

View Full Version : Multiple Pop Up window


trulenn
12-29-2002, 06:46 PM
First time user. I have installed a couple of pop up windows in a site I am creating. I remember finding a tutorial on using multiple pop ups but can't locate it. What is the scripting I need to do to get more than one pop up to work or a site that offers this tutorial? Thanks

piz
12-29-2002, 07:08 PM
I'm not pleased to help someone to open more than one popup... I hate popups...

but anyway.

When do you want those popups to open? onload? on clicking a link?

just make two popups, is the same than one, only a line more and a different name for the popup.

trulenn
12-29-2002, 07:23 PM
Thank Piz
I agree that popups are bad if not used correctly. I use a link with mine allowing the viewer to choose. What I have is two products that are different that need to be utilized as a popup. I know that each has a diffrent URL but where do I place the code? Thanks again

piz
12-29-2002, 07:35 PM
you want to open them by clicking on a link?

You can place either all the code in the href-attribute or in a javascript function.

all in the href:

<a href="JavaScript:window.open('url1',w1,'options');window.open('url1',w2,'options');">link</a>

in a function:

Place this in the head:

<script>
function open2popups()
{
window.open('url1',w1,'options');
window.open('url1',w2,'options');
}
</script>

and this is the link:


<a href="javascript:open2popups();">link</a>

trulenn
12-31-2002, 01:56 AM
Piz,
Sorry I didn't get back to you yesterday. Everything worked out. Thanks for the help.
Trulenn