Changeset 5478
- Timestamp:
- 05/06/08 22:21:43 (7 months ago)
- Location:
- trunk/jquery
- Files:
-
- 1 added
- 2 modified
-
src/ajax.js (modified) (1 diff)
-
test/data/echoQuery.php (added)
-
test/unit/ajax.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/ajax.js
r5374 r5478 490 490 }); 491 491 else 492 s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );492 s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) ); 493 493 494 494 // Return the resulting serialization -
trunk/jquery/test/unit/ajax.js
r5472 r5478 812 812 }); 813 813 814 test("data option: evaluate function values (#2806)", function() { 815 stop(); 816 $.ajax({ 817 url: "data/echoQuery.php", 818 data: { 819 key: function() { 820 return "value"; 821 } 822 }, 823 success: function(result) { 824 equals( result, "key=value" ); 825 start(); 826 } 827 }) 828 }); 829 814 830 } 815 831
