Advertisement
Hppavilion1

Dear god why won't this work

Dec 11th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.43 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <html>
  4.     <head>
  5.         <meta charset="utf-8"/>
  6.         <link rel="stylesheet" href="http://code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" type="text/css" media="all" />
  7.         <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />
  8.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
  9.         <script src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
  10.         <script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
  11.         <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script>
  12.        
  13.         <script type="text/javascript">
  14.             $(document).ready(function(){
  15.                 var $form = $('#cmdwin');
  16.                 $form.live('submit', function(){
  17.                 console.log('Submitted!')
  18.                     $.post("/calc", $form.serialize(), function(response){
  19.                     console.log('Posted!')
  20.                         console.log(response)
  21.                         $('#commands').html(response);
  22.                     },'json');
  23.                     return false;
  24.                 });
  25.             });
  26.         </script>
  27.     </head>
  28.    
  29.     <body>
  30.         <form method="none" accept-charset="utf-8" enctype="multipart/form-data" id="cmdwin">
  31.             <textarea id="commands" name="commands" rows="10" cols="70"></textarea>
  32.             <input type="submit" value="Crowdculate!"></input>
  33.         </form>
  34.     </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement