|window.showModalDialog( url, arguments, feature options);|
Where url is the URL of page which is to be opened in modal window and arguments are those arguments which we are passing to the modal window and feature options are the attributes set for the modal window.
Description of code:
Suppose we have an image file and we want to view that particular image file into a separate modal window. It is an example of situation where we need modal window. To illustrate showModalDilaog() method we have created two HTML pages. In the first page we have placed an image and we will pass that image as an argument to the modal window. When we will click on the image it calls the function showModalWindow().
As soon as the ModalPage.html is called , it calls the function showDialogArgs() on the body load event of the page. Here in this function we have received the arguments for the ModalPage by calling window.dialogArguments.
To view full image in a modal panel click on the image.
You can also download full source code from the following link:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.