Changeset 4106
- Timestamp:
- 12/11/07 20:16:19 (8 months ago)
- Location:
- trunk/jquery
- Files:
-
- 2 modified
-
src/ajax.js (modified) (1 diff)
-
test/unit/ajax.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/ajax.js
r4007 r4106 219 219 220 220 // If we're requesting a remote document 221 // and trying to load JSON or Script 222 if ( !s.url.indexOf("http") && ( s.dataType == "script" || s.dataType =="json" ) ) {221 // and trying to load JSON or Script with a GET 222 if ( !s.url.indexOf("http") && ( s.dataType == "script" || s.dataType =="json" ) && s.type.toLowerCase() == "get" ) { 223 223 var head = document.getElementsByTagName("head")[0]; 224 224 var script = document.createElement("script"); -
trunk/jquery/test/unit/ajax.js
r4059 r4106 574 574 }); 575 575 576 test("$.ajax() - script, Remote with POST", function() { 577 expect(3); 578 579 var base = window.location.href.replace(/\?.*$/, ""); 580 581 stop(); 582 583 $.ajax({ 584 url: base + "data/test.js", 585 type: "POST", 586 dataType: "script", 587 success: function(data, status){ 588 ok( foobar, "Script results returned (GET, no callback)" ); 589 equals( status, "success", "Script results returned (GET, no callback)" ); 590 start(); 591 } 592 }); 593 }); 594 576 595 test("$.getJSON(String, Hash, Function) - JSON array", function() { 577 596 expect(4);