Created
January 7, 2011 13:43
-
-
Save markembling/769462 to your computer and use it in GitHub Desktop.
Dynamically create and submit a form.
This file contains 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
// This would (does) work in proper browsers. | |
jQuery(createElement('form')) | |
.attr({'method':'post','action':/*some url*/}) | |
.submit(); | |
// IE needs it to be attached to the document somewhere first before submission will work. :( | |
var f = jQuery(createElement('form')) | |
.attr({'method':'post','action':/*some url*/}); | |
jQuery('body').append(f); | |
f.submit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment