?
Solved

Json Not supported error in ajax jquery

Posted on 2013-05-29
1
Medium Priority
?
502 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
[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
1 Comment
 
LVL 4

Accepted Solution

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

~AG
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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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…

762 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