1 <?php
require_once 'common.php'; ?
>
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">
7 <title
>jQuery test page
for csrf
-magic
</title
>
8 <?php
$loc = print_javascript('jquery', 'http://code.jquery.com/jquery-latest.js') ?
>
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">
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');