Basic methods for opening a PopUp window using Javascript?

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

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:
window.open ("http://www.dotnetfunda.com","mywindow","status=1,toolbar=1");

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


Sample Example:
window.showModalDialog("http://www.dotnetfunda.com", "mywindow","dialogWidth:400px;dialogHeight:395px");


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

Comments or Responses

Login to post response