Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

json not working on server in IE

Posted on 2014-01-30
3
Medium Priority
?
260 Views
Last Modified: 2014-01-30
I have an ajax call that returns json from my server. On my local machine the code works in all browsers and does exactly what it should be doing. When I load it on my server. Windows 2008 R2, it works in both Chrome and Firefox, but not in IE. I can't figure out what is wrong or what the solution maybe. Any ideas?? Again it works locally just fine in IE when in debug.

 $("#<%=txtPositionTo.ClientID%>").blur(function () {
                 currentObject = $("#<%=txtPositionTo.ClientID %>").val();
                 $.ajax({
                     type: "POST",
                     url: "Data.asmx/GetToPosition",
                     data: "{PostionNumber:'" + currentObject + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function (data) {
                         var a = data.d;
                         a = $.parseJSON(a);
                         BindPostionTo(a);


                     },
                     error: function (xhr, ajaxOptions, thrownError) {
                         alert(xhr.status);
                         alert(thrownError);
                     }

                 });

             });

Open in new window

0
Comment
Question by:NickMalloy
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39822259
What error are you getting?
0
 

Author Comment

by:NickMalloy
ID: 39822301
None, it just returns nothing to my boxes. If I do an alert it shows multiple objects for a. It does return a lot of data, and I looked up limits for IE, but it works locally so I can't see how that is the problem.
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39822325
So the problem is occurring in the success and not in the call?
Do an hard refresh to make sure you are not using old cached versions of any js files.
Can you verify the returned data is the same as in other browsers.
Add into your ajax params

cache: false,
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
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

971 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