Revisions
-
mwilliams revised this gist
May 14, 2009 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ $(':input', this).each(function() { inputs.push(this.name + '=' + escape(this.value)); }) // Adding a comment here to show a commit change. jQuery.ajax({ data: inputs.join('&'), url: this.action, -
mwilliams revised this gist
May 14, 2009 . 1 changed file with 0 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +0,0 @@ -
mwilliams revised this gist
May 14, 2009 . 1 changed file with 36 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $('#form_div').submit(function() { var inputs = []; $(':input', this).each(function() { inputs.push(this.name + '=' + escape(this.value)); }) jQuery.ajax({ data: inputs.join('&'), url: this.action, timeout: 2000, error: function() { console.log("Failed to submit"); }, success: function(r) { console.log("Posted successfully."); }}) return false; }) }); </script> </HEAD> <BODY> <div id="form_div"> <form id="my_form" action="ajax_sample.html" method="POST" accept-charset="utf-8"> <textarea name="text" rows="8" cols="40"></textarea> <p><input type="submit" id="submit_button" value="Continue →"></p> </form> <div> </BODY> </HTML> -
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $('#form_div').submit(function() { var inputs = []; $(':input', this).each(function() { inputs.push(this.name + '=' + escape(this.value)); }) jQuery.ajax({ data: inputs.join('&'), url: this.action, timeout: 2000, error: function() { console.log("Failed to submit"); }, success: function(r) { console.log("Posted successfully."); }}) return false; }) }); </script> </HEAD> <BODY> <div id="form_div"> <form id="my_form" action="ajax_sample.html" method="POST" accept-charset="utf-8"> <textarea name="text" rows="8" cols="40"></textarea> <p><input type="submit" id="submit_button" value="Continue →"></p> </form> <div> </BODY> </HTML>