Raffi 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, easy enough with Javascript.
Without Javascript, things get a lot more complicated (and I will not
discuss them here.)
Try reposting your question in comp.lang.javascript for detailed
description.
The idea is:
- Add a function to the event pressing the submitbutton.
(eg make it a button, and add onClick, or use onSubmit)
- read all the values from the form
val1 = document.forms.myinnerframeform.firstname.value;
val2 = document.forms.myinnerframeform.street.value;
etc.
Now call a function in your other frame (mainpage)
parent.frames.mainwindow.getThis(val1,val2);
But it has nothing to do with PHP.
Regards,
Erwin Moller