aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-09-03 23:45:14 +0000
committerJohn Resig <jeresig@gmail.com>2007-09-03 23:45:14 +0000
commita5dbcaf67579b2266b64ffbdd2a328d180f7f64b (patch)
treeacd1b43b4b22dae6038cb66ea9ba10a53323ca84 /build
parent456f0fe5985eaad42eba456b9ff710771669607c (diff)
downloadjquery-a5dbcaf67579b2266b64ffbdd2a328d180f7f64b.tar.gz
jquery-a5dbcaf67579b2266b64ffbdd2a328d180f7f64b.zip
Added support for:
- Cross Domain getScript $.getScript("http://foo.com/script.js"); - JSONP $.ajax({ url: "script.js", type: "jsonp" }); $.getJSON("script.js?callback=?"); - Cross Domain JSONP/getJSON $.getJSON("http://foo.com/script.js?callback=?"); - No-cache Ajax Requests $.ajax({ url: "test.html", cache: false });
Diffstat (limited to 'build')
-rw-r--r--build/test/data/jsonp.php10
-rw-r--r--build/test/index.html4
2 files changed, 12 insertions, 2 deletions
diff --git a/build/test/data/jsonp.php b/build/test/data/jsonp.php
new file mode 100644
index 000000000..75000252b
--- /dev/null
+++ b/build/test/data/jsonp.php
@@ -0,0 +1,10 @@
+<?php
+error_reporting(0);
+$callback = $_REQUEST['callback'];
+$json = $_REQUEST['json'];
+if($json) {
+ echo $callback . '([ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ])';
+} else {
+ echo $callback . '({ "data": {"lang": "en", "length": 25} })';
+}
+?>
diff --git a/build/test/index.html b/build/test/index.html
index 6956cb902..3b59b0e79 100644
--- a/build/test/index.html
+++ b/build/test/index.html
@@ -41,11 +41,11 @@
<form id="form" action="formaction">
<input type="text" name="action" value="Test" id="text1"/>
<input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
- <input type="radio" name="radio1" id="radio1"/>
+ <input type="radio" name="radio1" id="radio1" value="on"/>
<input type="radio" name="radio2" id="radio2" checked="checked"/>
<input type="checkbox" name="check" id="check1" checked="checked"/>
- <input type="checkbox" id="check2"/>
+ <input type="checkbox" id="check2" value="on"/>
<input type="hidden" name="hidden" id="hidden1"/>
<input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>