T
T
Test Test2015-08-26 17:04:24
JavaScript
Test Test, 2015-08-26 17:04:24

How to solve jQuery script issue in IE 10?

Good day, ladies and gentlemen. It fell to my lot to test the site on the IE browser. And one unpleasant bug was discovered, namely, the script cannot process the code sent from the html + js server.

1. Fragment of Javascript code (sending a request, and receiving data):

var xhrGetContent = $.ajax({
            url: '/users/orders',
            data: data,
            dataType: 'json',
            type: 'POST',
            success: function(responseJSON) {
                    <b>$popupContentResponse.html(responseJSON.view);</b>
            });
  }
});


2. An example of a json response received:

416ad48c697549778eb74b0fe68fde29.png

As we can see from point 1, we put responseJSON.view on the page , which contains html + js code. If you work under Chrome, Firefox, Opera - then everything works fine.

Now let's get back to IE 10. When executing the script, the following error pops up, which swears at the globalEval method:

e0118cb802034f5a866dfb8e24c264c7.png

Note:
1. The site is powered by Yii1 and all the js code is generated by various plugins
2. jQuery version 1.10.2

PS I don't dare to change jQuery yet , due to the fact that the entire front-end is written for version 1.10.2 (although you can try to switch).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2015-08-26
@cubooks

bugs.jquery.com/ticket/9221
stackoverflow.com/questions/10903989/could-not-com...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question