Posted by Tyrone Slothrop on 08/18/05 04:26
On 17 Aug 2005 17:33:21 -0700, "Raffi" <thegrizzzly@yahoo.com> wrote:
>I'm developing an application where the main page has an iframe that
>contains the form. The "Submit" button is located on the main page (not
>the iframe). Is it possible to get the form data from the iframe when
>the "Submit" button is pressed in the main browser page?
>
>Thanks,
>Raffi
Yes, but using JavaScript. Refer to the fields in the iframe thusly:
parent.iframe_name.document.form_name.field_name.value
It gets a bit more complicated with radios and checkboxes.
It would likely be easier to just submit the iframe rather than trying
to get the values.
<input type="button" value="Submit"
onClick="parent.iframe_name.document.form_name.submit()">
Navigation:
[Reply to this message]
|