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
Link to comment
Share on other sites

  • 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');"
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.