Solved

Json Not supported error in ajax jquery

Posted on 2013-05-29
1
491 Views
Last Modified: 2013-06-25
Can someone tell me why this is running ok on my local build but not working when deployed to server. On server it generates error on page warning at bottom left hand corner, when I click to see message it tells me that JSON is not supported.

What is so different in that its coming from the server?

When I copy the entire site from server to local it runs perfect so its not a code difference.


$.ajax({
                type: "POST",
                url: "ContractsList.aspx/StoreSearch",
                data: JSON.stringify(DTO),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(result, txtstatus) {
                }
            });
0
Comment
Question by:jazz__man
1 Comment
 
LVL 4

Accepted Solution

by:
Ahmed Hussein earned 500 total points
ID: 39204831
change contetType from contentType: "application/json; charset=utf-8", to contentType: "text/json; charset=utf-8",

~AG
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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)

746 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

10 Experts available now in Live!

Get 1:1 Help Now