submit and email two separate forms from one onclick event
I have a web page with two forms. I would like to click on a button and email both forms, one after the other to two different email addresses. I am new to jquery and I can't figure out the syntax but my attempt is below. I can do this with javascript but it only works in IE and FireFox but not in Chrome.
- <html>
<head>
<script type="text/javascript" src="jquery.js"></script>
$('#target1').submit(function() {
alert('Handler for .submit() called.');
return false;
$('#target2').submit()
});
</script>
</head>
- <body>
<form id="target1" action="mailto:yourFIRSTemail@email.com">
<input type="text" value="Hello there" />
<input type="submit" value="Go" />
</form>
- <form id="target2" action="mailto:yourSecondemail@email.com">
<input type="text" value="there" />
<input type="submit" value="hey" />
</form>
- </body>
</html>