Jump to content

form post iframe


The Little Guy

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/213777-form-post-iframe/
Share on other sites

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 :)

Link to comment
https://forums.phpfreaks.com/topic/213777-form-post-iframe/#findComment-1112692
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.