Created
July 10, 2012 14:02
-
-
Save wholypantalones/3083409 to your computer and use it in GitHub Desktop.
Submit A Form With A Link
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
| <a href="javascript:{}" onclick="document.getElementById('theFormName').submit();">submit</a> | |
| or | |
| <a href="#" onclick="return doMyBidding();">submit</a> |
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
| function doMyBidding() { | |
| var answer = confirm("Are you sure you want to do my bidding?"); | |
| if (answer){ | |
| document.getElementById('theFormName').submit(); | |
| } | |
| } | |
| or | |
| $("#thisahref").click(function() { | |
| $("#theform").submit(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment