Side navigation
#2174 closed bug (fixed)
Opened January 16, 2008 01:16AM UTC
Closed January 17, 2008 09:43PM UTC
Last modified October 08, 2013 01:08PM UTC
"Invalid Label" error in FF2 doing JSON AJAX request
Reported by: | dalangalma | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.3 |
Component: | core | Version: | 1.2.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This seems to be a bug introduced in jQuery 1.2.2, since it works in 1.2.1:
I'm making an AJAX call like:
$.ajax({
dataType: "json",
success: function() { ... },
error: function() { ... },
url: "http://localhost:8080/myurl"
});
Firefox responds with "Invalid Label". If I change the url to "/myurl", it works. In jQuery 1.2.1, both work.
Attachments (0)
Change History (4)
Changed January 16, 2008 09:32PM UTC by comment:1
Changed January 17, 2008 05:34AM UTC by comment:2
By using POST instead of GET the problem is avoided.
Works:
// Do Ajax $.ajax({ type: 'POST', url: 'http://localhost/path/actions.ajax.php', data: {test:'case'}, dataType: 'json', success: function(result){ alert(result); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); } });
Fails:
// Do Ajax $.ajax({ url: 'http://localhost/path/actions.ajax.php', data: {test:'case'}, dataType: 'json', success: function(result){ alert(result); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); } });
Changed January 17, 2008 09:43PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | new → closed |
Ok, this should be fixed with [4476]. See the changeset for details. This change essentially returns the line to the way it was in 1.2.1 which was working.
Changed October 08, 2013 01:08PM UTC by comment:4
it is not working
Here is use case that breaks in jquery-1.2.2 and Firefox
Let's assume the form tag is generated dynamically and javascript is static and in separate file.