Atian
03-27-2002, 01:37 PM
Ok, here is a JavaScript that will popup a window. And a button or link for the window to open or close.
==============================================
Place this part anywhere in the <HEAD></HEAD> part of your HTML document.
==============================================
<script language="JavaScript">
<!-- Hide from old browsers
function popwin(){
window.open("your.htm","","PLACE VALUES HERE*")
}
//--> End of Script
</script>
==============================================
Here you specify the values of your window and you'll put them within the quotes in the PLACE VALUES HERE part.
height=(x # of pixels high)
width=(x # of pixels wide)
toolbars=1 (yes), 0 (no)
scrollbars= " "
resizable= " "
fullscreen = " " **
top=(x # of pixels from the top)
left=(x # of pixels from the left)
**if you use fullscreen, then you cannot use height,width,resizable,top, and left.
If you omit any data values, it is an understood no. so leavong out the resizable value means it will default to no resizable.
==============================================
Place this anywhere in the <BODY></BODY> tags
==============================================
<FORM>
<INPUT TYPE="button" onClick="popwin()" VALUE="OPEN WIN">
</FORM>
<A HREF="javascriptopwin()">OPEN A POPUP HERE!</A>
==============================================
Put this in the <BODY></BODY> tags of the popup
==============================================
<FORM>
<INPUT TYPE="button" value="CLOSE ME!" onClick="window.close()">
</FORM>
<A HREF="javascript:window.close()">Close Window</A>
==============================================
The first group will make a button and a text link which will open your popup window.
The second group makes a button and text link which close your window.
Simple, huh?
==============================================
Place this part anywhere in the <HEAD></HEAD> part of your HTML document.
==============================================
<script language="JavaScript">
<!-- Hide from old browsers
function popwin(){
window.open("your.htm","","PLACE VALUES HERE*")
}
//--> End of Script
</script>
==============================================
Here you specify the values of your window and you'll put them within the quotes in the PLACE VALUES HERE part.
height=(x # of pixels high)
width=(x # of pixels wide)
toolbars=1 (yes), 0 (no)
scrollbars= " "
resizable= " "
fullscreen = " " **
top=(x # of pixels from the top)
left=(x # of pixels from the left)
**if you use fullscreen, then you cannot use height,width,resizable,top, and left.
If you omit any data values, it is an understood no. so leavong out the resizable value means it will default to no resizable.
==============================================
Place this anywhere in the <BODY></BODY> tags
==============================================
<FORM>
<INPUT TYPE="button" onClick="popwin()" VALUE="OPEN WIN">
</FORM>
<A HREF="javascriptopwin()">OPEN A POPUP HERE!</A>
==============================================
Put this in the <BODY></BODY> tags of the popup
==============================================
<FORM>
<INPUT TYPE="button" value="CLOSE ME!" onClick="window.close()">
</FORM>
<A HREF="javascript:window.close()">Close Window</A>
==============================================
The first group will make a button and a text link which will open your popup window.
The second group makes a button and text link which close your window.
Simple, huh?