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

Posted on    March-18-2011 12:00 AM

 JavaScript JavaScript 
 1 Answer(s)
  1217  View(s)
Rate this:

Amit Singh

Total Post:565

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)

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