View Full Version : resized pop up window


HardyzGurL87
08-01-2004, 08:26 PM
I've tried searching the forum for this topic, no such luck. Hopefully someone can help me with this.

How do you make a link that will open up a new window with smaller height and width definitions that the regular page? I just need the code to where you can specify the height and width definitions of the new window that the link will open.

thanks in advance :)

xsweetxlanax
08-01-2004, 08:37 PM
-Put this script right under the body tag-

<SCRIPT LANGUAGE=JAVASCRIPT>
<!-- Hide script from old browsers

//
// Just copy this whole script and place it in the body of all your
// pages. No need to change a thing
//


if (window != window.top) {
top.location.href = location.href;
}

// End hiding script from old browsers -->

</SCRIPT>


-Then put this-

<script language="Javascript">
<!--
function openWindow() {
popupWin = window.open('URL here', 'remote', 'width=#,height=#')}
//-->
</script>


-Use this to link it-
<a href="javascript:openWindow();">Text here</a>

and if you want an image to link use this:
<a href="javascript:openWindow();"><img src=URL of image></a>

change the stuff in the bold.. and where its :o change that to : and o only without the space