Home > DeveloperSection > Interviews > Basic methods for opening popup window in javascript?

Posted on    March-18-2011 12:00 AM

 JavaScript JavaScript 
Ratings:
 1 Answer(s)
  1090  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    March-18-2011 12:00 AM

There are two basic way to open new window
1) Using Window.Open() and
2) Using Window.showModalDialog()

The Syntax for using these methods are

. Window.Open(URL,WindowName,Window Features)

Example:
window.open ("http://www.dotnetfunda.com","mywindow","status=1,toolbar=1");

. window.showModalDialog(URL,WindowName,ModalDialog Features)
for example:
window.showModalDialog("http://www.mindstick.com", "mywindow","dialogWidth:400px;dialogHeight:395px");

Don't want to miss updates? Please click the below button!

Follow MindStick