View Full Version : several different pop-up windows on 1 page?


sunberri11
06-08-2004, 02:44 AM
is there a specific way to make a page so that there a several different pop-up links on one page?

since part of the code is in the head tag, and it doesn't have a name or anything, is there a certain way to do that? i.e. do the codes in the head tag have to go in the same order as the links?

thanx!!

also, is the pop-up window script usable by all different browsers?

edit:
and is there a way to make a pop-up so that it opens in the center of the screen?

thank-you!

sunberri11
06-08-2004, 02:47 AM
and is there a way to make a pop-up so that it opens in the center of the screen?

thank-you!

MaGiCSuN
06-08-2004, 11:58 PM
this is the code i use for my pop-ups. Normally you repeat the pop-up head part and give them different names, But that takes up allot of coding. This way requires only one head coding and just different codings for the links.

Put this between the <head> and </head>

<script language="JavaScript"><!--
function Win(url,h,w) { // (url,height,width)
var p = "height=" + h + ",width=" + w + ",scrollbars=yes";
window.open(url,"",p);
} // -->
</script>

then use this as the link:

<a HREF="javascript:Win('http://urlhere.html','300','500')">linkname</a>

first number 300 is height, second number 500 is width of the pop-up. And that code is what you repeat, only you change url and sizes for each link. The head coding doesn't need any changes

Love,
mirna