So I have this site that I need to post some data to. That site will be in an iFrame and the data that I'm posting is in my markup.
<iframe src="www.externalsite.com/whatever.php" name="my_iframe"></iframe
<form id="my_form" target="my_iframe">
<input type="hidden" name="age" value="12">
<input type="hidden" name="name" value="bob">
</form>
<script>
$('#my_form').submit();
</script>
I have a route that renders this page in node like this:
app.get('/age_page', function() {
res.render('age_page.html', res);
});
What is the correct way to send the data from my_form to the iframe so it renders the correct content inside my iframe? The iframe is just going to consume that data and store it in a database.