Not defined? Submit iframe from modal box post to iframe

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2011-01-04T19:03:13Z Indexed on 2011/01/04 19:54 UTC
Read the original article Hit count: 138

Filed under:
|
|

Hello,

I have

<iframe src="correctdata.php" frameborder="0" width="100%" height="330" id="correctdata"></iframe>
<div class="floatright"><a class="button bigger" onclick="window.frames['correctdata'].document.form['correct'].submit();">Submit</a></div>

And correctdata.php contains a form

<form method="post" action="correctdata.php" name="correct" id="correct"></form>

(There is other stuff, but I'd much rather not post it.

Yet when I press submit I get

window.frames.correctdata is undefined [Break On This Error] window.frames.correctdata.document.form.correct.submit();

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery