Release 1.0.5.
[csrf-magic.git] / js-test / jquery.php
blobda351d15f19f2903c89a334cfe177dc203af93f3
1 <?php require_once 'common.php'; ?>
2 <!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <head>
7 <title>jQuery test page for csrf-magic</title>
8 <?php $loc = print_javascript('jquery', 'http://code.jquery.com/jquery-latest.js') ?>
9 </head>
10 <body>
11 <h1>jQuery test page for csrf-magic</h1>
12 <p>Using <?php echo $loc ?></p>
13 <textarea id="js-output" cols="80" rows="4"></textarea>
14 <script type="text/javascript">
15 //<![CDATA[
16 var textarea = document.getElementById('js-output');
17 textarea.value = "jQuery " + jQuery.fn.jquery + "\n";
18 var callback = function (data) {
19 textarea.value += data;
21 jQuery.post('jquery.php', 'ajax=yes&foo=bar', callback, 'text');
22 jQuery.post('jquery.php', {ajax: 'yes', foo: 'bar'}, callback, 'text');
23 //]]>
24 </script>
25 </body>
26 </html>