Jump to content

[SOLVED] passing variables through an iframe


only one

Recommended Posts

As far as I know, an iframe is a seperate page. The only way I personally can think of doing this is to use a $_POST. Just have the parent frame send a POST variable to the child frame. It won't happen in realtime (meaning you will have to have the child iframe refresh), but it will work.

Link to comment
Share on other sites

its alright, i was trying to pass a session through to it but it didnt work, so i just had to make the soure of the frame like this

 

<iframe src='page.php?variable=$VariableToBePassed'>

 

which i was trying to avoid

Link to comment
Share on other sites

yup... iframes are completly seperate from the originating page... only 4 ways of passing info from one page to another...

$_POST... if you create a form, with a target of that frame...

$_GET... where you ?var=$var;...

$_SESSION...

and cookies...

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.