OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <title>Host Page</title> | |
4 <link rel="stylesheet" href="//yui.yahooapis.com/pure/0.4.2/pure-min.css"> | |
Jamie
2014/03/03 20:56:16
See above re: external URLs.
chaitali
2014/03/04 19:33:45
Done.
| |
5 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></sc ript> | |
6 </head> | |
7 <body> | |
8 <div class="splash"> | |
anandc
2014/03/03 21:10:03
Indent by 2 spaces: http://google-styleguide.googl
chaitali
2014/03/04 19:33:45
Done.
| |
9 <form class="pure-form pure-form-stacked"> | |
10 <fieldset> | |
11 <center><textarea id="testtext" rows="10" cols="50" ></textarea></cent er> | |
weitao
2014/03/03 21:33:42
Since you rely on tabbing to select the input cont
chaitali
2014/03/04 19:33:45
Done.
| |
12 </fieldset> | |
13 </form> | |
14 </div> | |
15 <script> | |
Jamie
2014/03/03 20:56:16
As with the client page, please pull out the JS in
chaitali
2014/03/04 19:33:45
Done.
| |
16 $("#testtext").keypress(function(e) { | |
17 if ( e.which == 13 ) { | |
Jamie
2014/03/03 20:56:16
Nit: No space after '(' or before ')'.
anandc
2014/03/03 21:10:03
Comment indicating 13 == carriage return
chaitali
2014/03/04 19:33:45
Done.
chaitali
2014/03/04 19:33:45
Done.
| |
18 var testTextVal = $("#testtext").val(); | |
19 var request = $.ajax({ | |
20 type: "POST", | |
21 url: "/keytest/test", | |
22 data: { text: testTextVal } | |
23 }); | |
24 request.done(function() { | |
25 console.log("Sent XHR!"); | |
Jamie
2014/03/03 20:56:16
Maybe remove these console logs, or replace them w
chaitali
2014/03/04 19:33:45
These are strictly for debugging if the test fails
| |
26 }); | |
27 request.fail(function(jqXHR, textStatus) { | |
28 console.log("Request failed: " + textStatus); | |
29 }); | |
30 } | |
31 }); | |
32 </script> | |
33 </body> | |
34 </html> | |
OLD | NEW |