I currently got this code
- Code: Select all
echo "<script type='text/javascript'>";
echo "parent.window.location='http://mydomain/';"; //main window
echo "window.location='http://mydomain.com/php/account.php?action=login&logout=true';"; //iframe
echo "</script>";
I know parent.window.location work, so does window.location for the iframe, but it only does one of the actions, the first one.
The reason to use both of them is when you login you get extra buttons to the menu, and when you logout i need it to refresh the website to remove the buttons, and still redirect the iframe to the login form with a cute good-bye message.
Any suggestions?
EDIT: I dont want to use any $_GET on the main window(mydomain.com?logout=true) then use javascript to redirect the iframe.
Kind regards,
Soder.

