How to open Model dialog window in ipad safari

Posted on 2013-08-28
Medium Priority
Last Modified: 2013-09-02
Hi, Experts!

I am running my asp.net application on the IE. I am using window.showModalDialog method to open popup window. It is working fine. But now I need to run my application on the ipad safari. But showModalDialog() method was not working in safari Browser in Ipad,so I am using window.open() function.But functionality of showModalDialog() has been lost. Please guide me that how can I open popup in ipad safari. My application is very big. so solution should be quick and fast. I cannot make heavy changes in my application.

Question by:amazursky
  • 4
  • 3
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 1000 total points
ID: 39445233
I believe that is an IE only function.  Can you use jquery ui or jquery mobile?



Author Comment

ID: 39445432
If I use jquery ui or jquery mobile then I need to make big changes in my application and I don't want this. Is there any easy and quick solution?
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39445490
What about having a link to open up what you need using  target="_blank"

Do you have any other javascript libraries running  or just  pure html, css, js?
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions


Author Comment

ID: 39445818
I am using simple html, css and js
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39445961
How many places do you need the pop up?  You may need to selectively add jquery. The highest level of jquery accounts for IE.  Jquery 2 removes IE support (IE 10 should work).

Author Comment

ID: 39448319
There are lots of places. If I use jquery ui then I need to add div on each parent pages. It is lot of work. Is there any easy option?
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39448386
Do all of your pages have separate files for css and js?  Or do you have using server side includes to bring in common files like css, javascript and headers and footers?  If you did it that way your job is easy.  If you did not, this is a good case why you should be developing that way....

Anywhere I have similar content I use include files.  If I have a 100 page site and now I want to include a new js and css file, I just need to update 2 files. One for common js and one for common css.  Any files I don't want common, get loaded separately.    The same is true for any header, footer etc.  

If you did do it the way I described, you can inject html and css via jquery.

Below is code for a 2 elements and I have injected a third div with the id modal and use jquery ui to give it the basic dialogue. http://jsbin.com/orUNaqe/1/edit?html,js,output

<!DOCTYPE html>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
  <div id="body">I am body</div>
  <div id="footer">I am footer</div>

Open in new window

 $(function() {
     $('#footer').after('<div id="modal">I am modal</div>');
      $( "#modal" ).dialog();

Open in new window


Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
In a question here at Experts Exchange, a member was looking for "a little app that would allow sound to be turned OFF and ON by simply clicking on an icon in the system tray". This article shows how to achieve that, as well as providing the same OF…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question