View Full Version : Where to put the code...


instant karma
07-04-2003, 11:37 PM
I'm using a pop-up window, and I'm not sure where to put this code.

{ window.open ("blah.html","popup","width=yourwidth,height=yourheight,location=0,menub ar=0, resizable=0,scrollbars=0,status=0,titlebar=1,toolb ar=0 , left=your number here, top=your number here") }

and also... when I make the page.. is it like making a normal page, or is there something I have to do? I've never used pop-ups before, and I'm basically clueless! Please help.

www.ace-hurler.com/petz/test/me

Alcy
07-05-2003, 01:29 AM
http://www.lissaexplains.com/java4.shtml#window

^ You put the code in your <head>. Yup, the page in the popup is just like a normal page ^_^

christiandude03
07-05-2003, 01:32 AM
You also need to modify your code a little....


<script type="text/javascript"><!--
window.open ("blah.html","popup","width=yourwidth,height=yourheight,location=0,menub ar=0,resizable=0,scrollbars=0,status=0,titlebar=1, toolbar=0,left=your number here, top=your number here")
</script>

instant karma
07-05-2003, 02:35 AM
Thanks! And, one more thing... I have more than one op-up on the page, do I have to put on of those codes for each pop-up?

christiandude03
07-05-2003, 03:04 AM
If all the popup windows are the same size, no.

Here's how you'd do it:


<script type="text/javascript"><!--

function popup(url) {
window.open (url,"_blank"," width=yourwidth,height=yourheight,location=0,menub ar=0,resizable=0,scrollbars=0,status=0,titlebar=1, toolbar=0,left=yournumber here, top=your number here")
}

// for each window:

popup("blah1.html");
popup("blah2.html");

// etc...

//--></script>