targeting an iframe / different window with header

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

targeting an iframe / different window with header

Post by suthie »

How can i use the header() function to target a different window?

What I want to do is target the whole window from within an iframe... can i do this with header() ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

header() cannot target any window.
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

Post by suthie »

is there a function that can target a window?

and btw i mean the current window, not a totally different window. i just want to access the window from within an iframe
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Nothing in PHP can target a window. That's entirely client-side functionality.
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

Post by suthie »

could i use javascript within php like this:

Code: Select all

<?php
...php code...
if(condition){
?>
...javascript redirect code here...
<?php
}
?>
?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Potentially.
Post Reply