Solved

Sweetalert2 not working on IE

Posted on 2016-08-09
3
29 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 30

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

757 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

21 Experts available now in Live!

Get 1:1 Help Now