Jorge
Jorge

Reputation: 18237

jquery ajax event not working in ie

I had a ajax called like this

 $.ajax({
    async: false,
    type: "POST",
    data: "{}",
    url: "/Clases/WebMethods.asmx/crearMenu",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: createMenu
});

This works perfect in Firefox and Chrome, but it doesn't in IE, the most rare part is that when turn on the developers tools in the browser, it works!!!. Can someone help me, if it's a configuration in the browser or something else. I already tried erasing the cache and cookies of the browsers and doesn't solve my problem. Thanks

Upvotes: 0

Views: 848

Answers (2)

legendofawesomeness
legendofawesomeness

Reputation: 2911

I had a similar problem with the success function not working on IE (See my thread: JQuery button click not working after ajax form submit on IE). I solved it by making success callback a native JS method and not to user JQuery.

See if that solves your problem.

Upvotes: 0

Gazler
Gazler

Reputation: 84150

I come across this frequently in IE and generally, if something works with the developer tools enabled and not without, you will have a console.log somewhere in your code that is erroring as there is no console, preventing the rest of the code from executing.

Upvotes: 2

Related Questions