crouchjay Posted May 14, 2006 Share Posted May 14, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/9651-how-to-retrieving-data-from-an-iframe-and-pass-to-php/ Share on other sites More sharing options...
nogray Posted May 26, 2006 Share Posted May 26, 2006 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');" Quote Link to comment https://forums.phpfreaks.com/topic/9651-how-to-retrieving-data-from-an-iframe-and-pass-to-php/#findComment-39245 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.