Tagged Questions
65
votes
4answers
37k views
jQuery single quote in JSON response
I'm making requests to my server using jQuery.post() and my server is returning JSON objects (like { "var": "value", ... }. However, if any of the values contains a single quote (properly escaped like ...
40
votes
1answer
27k views
Easiest way to create a cascade dropdown in ASP.NET MVC 3 with C#
I want to create two dropdown lists in a cascade using MVC3 (preferably Razor) with C#.
I would like to have one dropdown where you can choose the year and another one where you can choose a specific ...
34
votes
1answer
14k views
ASP.NET MVC 2 - Failed with jquery ajax response
I do not understand this error, do not generate error in "JsonResult Test ()", I am doing other projects as ASP.NET MVC
Thanks
Error:
System.InvalidOperationException: This request has been blocked ...
30
votes
8answers
45k views
jquery ajax request failing in IE
The following ajax call is failing in IE.
$.ajax({
url:"{{SITE_URL}}/content/twitter.json",
dataType:"json",
error:function(xhr, status, errorThrown) {
...
29
votes
6answers
44k views
Problems with jQuery getJSON using local files in Chrome
I have a very simple test page that uses XHR requests with jQuery's $.getJSON and $.ajax methods. The same page works in some situations and not in others. Specificially, it doesn't work in Chrome on ...
15
votes
1answer
8k views
asp.net web forms json return result
I use asp.net and web forms.
In my project I have asmx web service
[WebMethod]
public string GetSomething()
{
// avoid circual reference(parent child)
List<RetUsers> res = ...
12
votes
2answers
183 views
Form within a form and a JSON call
In my page I have a form:
<form method="post" id="confirm-order-form" name="confirm-order-form">
Inside the form I have written some scripts to make a JSON call:
<script ...
11
votes
1answer
14k views
Sending JSON to WCF Rest Service - object is always null
I am trying to get my application working by using REST, WCF and JSON (new to all those technologies). I have the 'GET' working fine. It is the 'POST' that is causing me problems.
As you will see ...
10
votes
8answers
10k views
jQuery 1.5 AJAX call fails with “invalid label” for JSON requests
I've just upgraded from version 1.4 to version 1.5 of jQuery, and now my AJAX calls always fail with the "invalid label" error.
An example request is:
jQuery.ajax({
async: false
, dataType: ...
10
votes
2answers
18k views
Cannot set content-type to 'application/json' in jQuery.ajax
When I have this code
$.ajax({
type: 'POST',
//contentType: "application/json",
url: 'http://localhost:16329/Hello',
data: { name: 'norm' },
dataType: 'json'
});
in Fiddler I ...
9
votes
5answers
26k views
Using jQuery to get json data returns invalid label error
I have this code, and have also tried something similar using the $.getJson function:
jQuery(document).ready(function(){
var kiva_url = "http://api.kivaws.org/v1/loans/newest.json";
...
9
votes
3answers
2k views
Client-side templating frameworks to streamline using jQuery with REST/JSON
I'm starting to migrate some html generation tasks from a server-side framework to the client. I'm using jQuery on the client. My goal is to get JSON data via a REST api and use this data to populate ...
7
votes
3answers
9k views
Problem with Spring 3 + JSON : HTTP status 406?
I'm trying to get a list of Cities by sending the State name through Ajax in my SpringMVC 3.0 project.
For the purpose, I've used the following call (using jQuery) in my JSP:
<script ...
7
votes
1answer
15k views
Passing parameters in a jQuery ajax call to an ASP.NET webmethod
I know there are more threads about this but they dont help me and I'm going insane here!
I wanna pass some parameters in to a web method using jQuery Ajax.
var paramList = '';
for(i = 0; i < ...
5
votes
4answers
7k views
Ajax.BeginForm, Calls Action, Returns JSON, How do I access JSON object in my OnSuccess JS Function?
Ajax.BeginForm calls an action and then returns JSON.
How do I access JSON object in my OnComplete js function?
so my Ajax.BeginForm looks like this...
using (Ajax.BeginForm("Coupon", new ...