pierrewaters / jqueryjs

Automatically exported from code.google.com/p/jqueryjs
0 stars 0 forks source link

Ajax submission of JSON datatype fails if any var starts with '?' #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$.ajax(
{
 url: '/test/',
 type: 'get',
 dataType: 'json',
 data: { myvar: '?test' },
});

What is the expected output? What do you see instead?
Expected to get '&myvar=%3Ftest' server side. Instead JQuery treats the
value as JSONP, turning it into '&myvar=jsonp[13DIGITNUMBER]test'.
Additionally, while it DOES submit the request, the Ajax query will trigger
neither success or error calls.

What version of the product are you using? On what operating system?
JQuery 1.2.1
Tested on Firefox 2.0.0.7, IE6, and IE7.

Please provide any additional information below.
I quick fixed this for myself by simply commenting out the if block
starting at line 2216. I think, but am somewhat unsure if s.dataType should
be checking for 'jsonp' instead of 'json'. :|

Original issue reported on code.google.com by broiledmeat on 2 Oct 2007 at 6:18

GoogleCodeExporter commented 9 years ago
Thank you for writing up this problem.  Unfortunately we use a different bug 
tracking system at http://dev.jquery.com/ so this issue was just noticed.  In 
the 
future, please use that system for tracking issues.  We are going to check the 
current google issues and then close this issue database to help stop any 
confusion 
about which to use.

This issue is a duplicate of the following ticket:

http://dev.jquery.com/ticket/2020

You can read about it's resolution in the comments.

Original comment by davidser...@gmail.com on 11 Jan 2008 at 6:30