Web Hosting Talk







View Full Version : Coding Pop-ups


Midtown89
05-15-2004, 01:42 AM
Can anyone help me by explaining how to write pop-up scripts... thx just post here

JLBeam
05-15-2004, 03:26 AM
Originally posted by Midtown89
Can anyone help me by explaining how to write pop-up scripts... thx just post here

Not sure what you mean exactly by "pop-up scripts," but the following JavaScript function will display a web page in a pop-up window, if that's what you're looking for.

<script language="JavaScript" type="text/javascript">
<!--
function popup(page)
{
newwin = window.open(page, '0', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=480');
}
-->
</script>

Place that in the head of your HTML document (ie, right below <title></title> pair), then call the function like so:

<a href="javascript:popup('xyz.html')">Display Pop-up</a>

(remove the space in "java script")

...

Hope this helps,