Created
June 27, 2011 15:47
-
-
Save Patrick64/1049120 to your computer and use it in GitHub Desktop.
JQuery: Include this javascript in your page so when the user submits a form their browser opens a new window with the form contents in the querystring.
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 characters
//open a new window with form fields put in querystring, rather than submit form | |
$('document').ready(function() { | |
$('form').submit(function() { | |
var url = $(this).attr('action') + '?' + $(this).serialize(); | |
window.open(url); | |
return false; // dont submit form | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment