Hi i have a form inside a frame, for example:
[code=php]<html>
<body>
<div><h1>Header</h1><hr /></div>
<iframe height=”75%” width=”75%” src=”iframe.php” frameborder=”0″>
Iframe should be enabled.
</iframe>
<div><hr /><h1>Footer</h1></div>
</body></html>
in iframe.php
[code=php]<form action=”http://some-url” id=”my_form” name=”my_form” method=”POST”>
<!– hidden fields goes here —>
<input id=”<?php echo $key; ?>” name=”<?php echo $key; ?>” value=”<?php echo $value; ?>” type=”hidden”/>
<!– //hidden fields goes here —>
</form>
<script type=”text/javascript”>document.getElementById(“my_form”).submit();</script>
I would like to know how to submit the iframe.php form so that it goes out of frame.
I think we need to tweak this code:
[code=php]<script type=”text/javascript”>document.getElementById(“my_form”).submit();</script>
Thanks in advance.