Solved

Sweetalert2 not working on IE

Posted on 2016-08-09
3
52 Views
Last Modified: 2016-11-21
I am using the code below, for some reason this works fine on all browsers except IE, can anyone shed some light on it.

click 'Locate Dealer' under the product, it should open a modal window and the window is not popping up on IE
http://tinyurl.com/hlczjyr

<script type="text/javascript" src="https://cdn.jsdelivr.net/sweetalert2/4.0.13/sweetalert2.min.js"></script>
                        <link href="https://cdn.jsdelivr.net/sweetalert2/4.0.13/sweetalert2.min.css" rel="stylesheet" />
                        <script type="text/javascript">// <![CDATA[
                        $(document).on("click", "#swal", function(){
                        
                        swal({
                          title: "",
                          text: "Message",
                          type: "",
                          showCancelButton: true,
                          confirmButtonColor: "#DD6B55",
                          confirmButtonText: "Continue to Dealer Locator",
                          closeOnConfirm: false
                        }).then(function() {
                          window.location.href = "/dealers";
                        });
                        });
                        // ]]></script>

Open in new window

0
Comment
Question by:movieprodw
3 Comments
 
LVL 31

Accepted Solution

by:
Marco Gasi earned 250 total points
ID: 41750336
IE11 doesn't support promises. Youc an download and include es6-promise. Be sure to include it before sweetalert2.
If it doesn't work, download a pre-2.0 version of es6-promise.
0
 
LVL 24

Assisted Solution

by:lenamtl
lenamtl earned 250 total points
ID: 41752784
Hi
sweetalert2 is compatible with IE.
try the latest version, there was a bug fix 3 days ago about fade animation
https://github.com/limonte/sweetalert2

you can test the demo :  https://limonte.github.io/sweetalert2/

By the way your website popup is working ok on my IE11 W7
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now