468,760 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,760 developers. It's quick & easy.

Getting IFRAME fields to work in parent page

Not sure if this is the correct group for this but I assume this can be done
with javascript.

Basically, I have a page with a form on it. There is also an IFRAME on the
page that has several form fields which contain the results of a database
query. I need to be able to submit the form and have the fields in the
IFRAME submitted along with it.

Is there a way to do this with javascript?

Thanks!

Jul 23 '05 #1
2 2199
Targa wrote:
Basically, I have a page with a form on it. There is also an IFRAME
on the page that has several form fields which contain the results of
a database query. I need to be able to submit the form and have the
fields in the IFRAME submitted along with it.


Have the parent document contain hidden fields matching those in the iframe.
When the form is submitted, copy the values from each of the fields in the
iframe to the hidden fields in the parent document, then submit.

--
Matt Kruse
Javascript Toolbox: http://www.mattkruse.com/javascript/
Jul 23 '05 #2
Sounds like what I need.
How can I do it?
Do the fields in the IFRAME need to be inside a seperate <Form> tag - other
than the form on the parent page?
Or does the IFRAME need to be within the parent form tags?
Can this all be done with one button click? (copy and submit)

Thanks!

"Matt Kruse" <ne********@mattkruse.com> wrote in message
news:c9*********@news3.newsguy.com...
Targa wrote:
Basically, I have a page with a form on it. There is also an IFRAME
on the page that has several form fields which contain the results of
a database query. I need to be able to submit the form and have the
fields in the IFRAME submitted along with it.
Have the parent document contain hidden fields matching those in the

iframe. When the form is submitted, copy the values from each of the fields in the
iframe to the hidden fields in the parent document, then submit.

--
Matt Kruse
Javascript Toolbox: http://www.mattkruse.com/javascript/


Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jeronimo Bertran | last post: by
8 posts views Thread by Henrik Stidsen | last post: by
7 posts views Thread by nicknack | last post: by
4 posts views Thread by bushi | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.