Jump to content

how to retrieving data from an Iframe and pass to php


crouchjay

Recommended Posts

I am trying to retrieve a value from an I frame

[code]var found = window.frames[course].forms[frm1].elements[golfcourse];[/code]

and then when the user presses the submit button send the variable found with the other data chosen.

So basically what is happening is; I am using an Iframe to search for courses then when the user has found a course it appears in an input text field. After the user chooses the course then the proceed to the main page and finsh filling out the form. The other fields I want submitted along with the course. How do I go about doing this? Thanks in advance.

Jay
  • 2 weeks later...
In your iframe, use the parent.Your_function_name() to call a javascript function in the main page. So, you'll need to create a function that will set the value of a hidden field in the main page. When the user search in the iframe and select the course, use the event (onclick, onchange, etc...) to call the parent function like this onclick="parent.Your_function_name('value');"

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.