Oreamnos
Mar 26th 2006, 6:01 am
anyone know how i can submit a form in frame2 after submitting a form in frame1?
i've been using the following code (and modifications of it) but it's not working at all:<script type="text/javascript">
<!--
function submitform()
{
parent.form2.submit();
return true;
}
//-->
</script>
<form method="post" name="form1" onSubmit="return submitform();">
field2: <input name="field2" value="<?php echo $_POST['field2']; ?>" type="text"><br />
<input type="submit" name="submit" value="submit">
</form>
my other form is named form2 and holds the preceding code in an <iframe>.
any help would be totally appreciated on this one as i've been struggling with this for a few days... :(
thanks
eric
i've been using the following code (and modifications of it) but it's not working at all:<script type="text/javascript">
<!--
function submitform()
{
parent.form2.submit();
return true;
}
//-->
</script>
<form method="post" name="form1" onSubmit="return submitform();">
field2: <input name="field2" value="<?php echo $_POST['field2']; ?>" type="text"><br />
<input type="submit" name="submit" value="submit">
</form>
my other form is named form2 and holds the preceding code in an <iframe>.
any help would be totally appreciated on this one as i've been struggling with this for a few days... :(
thanks
eric