backt

Pop-up Windows


You can open up another window that can be controlled by the main browser window. Using JavaScript and window.open() method, it is possible to control the look and feel of the new window.


<script language=JavaScript>
<!--
window.open('url','window_name','features')
//-->
</script>




To understand what is going on, take a look at how the button is coded.

window.open('test1.html','example','width=200,height=200,menubar=no,toolbar=no,location=no,directories=no')

url = test1.html
url is loaded into the pop-up window

window_name = example
Window_name is the target name of the new window.

features = width=200,height=200,menubar=no,toolbar=no,location=no,directories=no
width Specifies the width of the window in pixels
height Specifies the height of the window in pixels
menubar Controls the menu at the top of the window
toolbar Controls the standard browser toolbar
location Controls the location entry field
directories Controls the standard browser directory buttons.



Back to JavaScript homepage | Back | Email me