Advertisement
mightyroot

phpRequest

Oct 16th, 2011
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <html>
  3. <head>
  4. <script src="JsHttpRequest.js"></script>
  5. <script type="text/javascript" language="JavaScript">
  6. function doLoad(value) {
  7.     // Create new JsHttpRequest object.
  8.     var req = new JsHttpRequest();
  9.     // Prepare request object (automatically choose GET or POST).
  10.     req.open('GET', '/cgi-bin/parser.pl', true);
  11.     // Send data to backend.
  12.     req.send( { q: value } );
  13. }
  14. </script>
  15. </head>
  16. <body onload="doLoad(this.value)">
  17. <form>
  18.     EX.UA: <input type="text" name="text">
  19.     <input type="button" value="Search"
  20.       onclick="doLoad(this.form.text.value)">
  21. </form>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement