Solved

Json Not supported error in ajax jquery

Posted on 2013-05-29
1
500 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
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…

726 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