Solved

Sweetalert2 not working on IE

Posted on 2016-08-09
3
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 25

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

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…
This article discusses how to create an extensible mechanism for linked drop downs.
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…
Suggested Courses

734 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