Avatar of amazursky
amazursky asked on

How to open Model dialog window in ipad safari

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.

Thanks
Scripting LanguagesWeb Languages and Standards

Avatar of undefined
Last Comment
Scott Fell

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Fell

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
amazursky

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?
Scott Fell

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?
ASKER
amazursky

I am using simple html, css and js
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Scott Fell

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).
ASKER
amazursky

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?
Scott Fell

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>
<html>
<head>
<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>
</head>
<body>
  <div id="body">I am body</div>
  <div id="footer">I am footer</div>
</body>
</html>

Open in new window

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

Open in new window

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.