Select to view content in your preferred language

window.showModalDialog() not working with ArcGIS Online templates

587
0
10-16-2012 12:22 PM
HubertLo
Emerging Contributor
I am using the Basic Viewer template from ArcGIS Online as the core of my project. The template by itself saves me weeks of work as compared to create the beautiful user interface by myself. However when I try to integrate my project with my main application, I find out the application will not work if I use window.showModalDialog() to show the Basic Viewer page (index.html). I cannot even get the basic map to show up!

As for my own investigation, I realize that window.open() works ok. However I need to use window.showModalDialog() in order to make call backs to the parent page once the user selects something my customized graphic layer. Our main application is currently confined to Internet Explorer only so window.showModalDialog() lack of cross browser support is not an issue for us. In fact it is being used all over the place in there. It will not be possible to use dojo in the main application at this moment. If dojo is the only way to accomplish this modal/callback thing, I need to know why so I can explain to my management.

Using an intermediate page with iFrame seems to solve the problem but I am hoping I can use the main index.html directly. That will simplify my code when I have to deal with parameters and callbacks.

My call looks like this:
window.showModalDialog("index.html","","dialogWidth:1000px;dialogHeight:700px;help:no;resizable:yes;scroll:no;status:yes;");


I have attached my original Basic Viewer project where I added the popup.html which have the code mentioned above.

Please advise.
0 Kudos
0 Replies