Jump to content

Archived

This topic is now archived and is closed to further replies.

Hailwood

header('location: index.php'); parent?

Recommended Posts

hi there, i have a php script inside an iframe, is it possible to redirect the parent instead of the iframe?

Share this post


Link to post
Share on other sites

not with PHP.. AKA, not with the header() function

 

You gotta use Javascript..

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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