Print
02
May
2008

window.open

 

To open a new window of a set size, you will need to use a ready-made JavaScript function, that looks like:

window.open('url to open','window name','attribute1,attribute2')

This is the function that allows you to open a new browser window for the viewer to use.

You can incorporate it into HTML like this:

<a href="#" onClick="window.open('page.html','windowname','width=400,height=200')">Click Here</a>

 

page.html - the URL of the target page

windowname - the name that will appear in the title of the page/pane

 

Some other options you can use include (all can be set to 0 or 1, except for width and height which should be set as a number of pixels):

status The status bar at the bottom of the window.
toolbar The standard browser toolbar, with buttons such as Back and Forward.
location The Location entry field where you enter the URL.
menubar The menu bar of the window
directories The standard browser directory buttons, such as What's New and What's Cool
resizable Allow/Disallow the user to resize the window.
scrollbars Enable the scrollbars if the document is bigger than the window
height Specifies the height of the window in pixels. (example: height='350')
width Specifies the width of the window in pixels

 

Interested in building next-gen Big Data architecture? Join our webcast on 5/24 at 9am PT. Register here: http://t.co/k5Dsfskg

Oracle Oracle

#Oracle User Groups: Are You a Member Yet? Learn more about our 870 User Groups worldwide and become a member today: http://t.co/LsktPjH5

Oracle Oracle