Hailwood Posted May 12, 2010 Share Posted May 12, 2010 hi there, i have a php script inside an iframe, is it possible to redirect the parent instead of the iframe? Link to comment https://forums.phpfreaks.com/topic/201461-headerlocation-indexphp-parent/ Share on other sites More sharing options...
Zane Posted May 12, 2010 Share Posted May 12, 2010 not with PHP.. AKA, not with the header() function You gotta use Javascript.. Link to comment https://forums.phpfreaks.com/topic/201461-headerlocation-indexphp-parent/#findComment-1056942 Share on other sites More sharing options...
Hailwood Posted May 12, 2010 Author Share Posted May 12, 2010 damn, well so if i am using jquery could i do something like. <script type="text/javascript"> $(function(){ <?php if(isset($_GET['url'])) { $url = $_GET['url']; echo "parent.location = 'http://'.$url.'";'; } ?> } </script> Link to comment https://forums.phpfreaks.com/topic/201461-headerlocation-indexphp-parent/#findComment-1056944 Share on other sites More sharing options...
teamatomic Posted May 12, 2010 Share Posted May 12, 2010 Do what ever you need to something like this: <script type="text/javascript"> window.location.href = "http://<?php echo $url; ?> target='_top'"; </script> HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/201461-headerlocation-indexphp-parent/#findComment-1056947 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.