I first want to display the two files:

index.htm:
<iFrame name="if1" id="if1" src="form.php" width="100%" height="100%"></iFrame>

form.php:
<?
if($txtName) {
echo("Your name is $txtName");
exit;
}


echo("
<form method=post action=form.php>
<input type=text name=txtName>
<input type=submit value=Submit>
</form>
");
?>


Here's my question:
Basically, I have form.php in an iFrame. Is there any way I can use JavaScript in index.htm to fill out form information in form.php and submit the data? This would be a huge help if there is a way! I've researched many ways, but can't find a way that actually works. Any ideas?