only one Posted May 15, 2007 Share Posted May 15, 2007 is there a way to pass variables through n iframe? Quote Link to comment https://forums.phpfreaks.com/topic/51532-solved-passing-variables-through-an-iframe/ Share on other sites More sharing options...
frozenfire89 Posted May 15, 2007 Share Posted May 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/51532-solved-passing-variables-through-an-iframe/#findComment-253791 Share on other sites More sharing options...
only one Posted May 15, 2007 Author Share Posted May 15, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/51532-solved-passing-variables-through-an-iframe/#findComment-253812 Share on other sites More sharing options...
cmgmyr Posted May 15, 2007 Share Posted May 15, 2007 you could probably use a session too...but the way you just listed would be the easiest Quote Link to comment https://forums.phpfreaks.com/topic/51532-solved-passing-variables-through-an-iframe/#findComment-253816 Share on other sites More sharing options...
taith Posted May 15, 2007 Share Posted May 15, 2007 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... Quote Link to comment https://forums.phpfreaks.com/topic/51532-solved-passing-variables-through-an-iframe/#findComment-253819 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.