Basic methods for opening a PopUp window using Javascript?

 Posted by Chvrsri on 12/17/2010 | Category: JavaScript Interview questions | Views: 5297 | Points: 40

There are 2 different simple ways using javascript.

they are
1) Using Window.Open() and
2) Using Window.showModalDialog()

The Syntax for using these methods are

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

Sample example: ("","mywindow","status=1,toolbar=1");

. window.showModalDialog(URL,WindowName,ModalDialog Features)

Sample Example:
window.showModalDialog("", "mywindow","dialogWidth:400px;dialogHeight:395px");

Source: My Own Observation | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response