Your Open Source

 
Related Links

PHP

JavaScript Popup Windows

Popup windows are additional browser window opened from a web page. The popups are opened programmatically using JavaScript.

Changing the features of the Popup
You can control the features of the popup using the last argument to the window.open method. The following code opens a window with a status bar and no extra features.
window.open ("http://www.youropensource.com","mywindow","status=1");

The code below opens a window with toolbar and status bar.
window.open ("http://www.youropensource.com",
"mywindow","status=1,toolbar=1");

The table shows the features and the string tokens you can use:
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.


Examples
The following code opens a window with menu bar. The window is resizable and is having 350 pixels width and 250 pixels height.
window.open ("http://www.youropensource.com",
"mywindow","menubar=1,resizable=1,width=350,height=250");


Example2

A window with location bar, status bar, scroll bar and of size 100 X 100
window.open ("http://www.youropensource.com",
"mywindow","location=1,status=1,scrollbars=1,
width=100,height=100");

  • hits 240
  • datetime Nov 17 08 10:40:48
  • author Psbharathy
  • rating

Rating : 12345

Comments

No Reply..

Quick Reply or Comments

Preview
Your Name:
Your Reply :
<> is a code tag
Enter the verification code: