The Little Guy Posted September 19, 2010 Share Posted September 19, 2010 I have an editable IFrame, and I would like to pass the data that was inserted into the iframe as form post data. how can that be done? slimed down form: <form action="/process/report.php" method="post"> <iframe id="story" name="story" onload="this.contentWindow.document.designMode = 'On';"></iframe> </form> Quote Link to comment Share on other sites More sharing options...
RussellReal Posted September 19, 2010 Share Posted September 19, 2010 this can be done fairly easy.. but you need to make the inputs and stuff.. then the submit button onclick will gather all the information and trigger a parent function so you'd do something like this window.parent.formSubmit(field1,field2,field3,field4); and then in formSubmit, that will trigger the form to submit, after you make the form elements inside the form.. then set the values to those specific fields inside the parent's form.. because the fields inside the iframe will never be detectible by the form on the parents page.. so you'd need to manually send the data from the child to the parent like I said above.. goodluck Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.