Getting IFRAME fields to work in parent page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Targa

    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!



  • Matt Kruse

    #2
    Re: Getting IFRAME fields to work in parent page

    Targa wrote:[color=blue]
    > 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.[/color]

    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/


    Comment

    • Targa

      #3
      Re: Getting IFRAME fields to work in parent page

      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" <newsgroups@mat tkruse.com> wrote in message
      news:c9h03d02pd n@news3.newsguy .com...[color=blue]
      > Targa wrote:[color=green]
      > > 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.[/color]
      >
      > Have the parent document contain hidden fields matching those in the[/color]
      iframe.[color=blue]
      > 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/
      >
      >[/color]



      Comment

      Working...