You are here: Re: [PHP] Which script runs first? « PHP « IT news, forums, messages
Re: [PHP] Which script runs first?

Posted by Rens Admiraal on 01/08/05 14:17

The way frames are loaded is actually dependent of many things I think
(size and browser e.g.), so, most secure is to use javascript, or, let
PHP check if the var is set, and if not, reload...

you can do this like this:

javascript:
left.php:
<body onload="parent.frames['targetframename'].location='page'"> // can
be a little different, but I think it is correct...

PHP method:
in main.php:
if (!isset ($_SESSION["var"])) header ("location:
{$_SERVER["PHP_SELF"]}"); // or something like this what will do the same...

gustav@varupiraten.se wrote:

>Hi there!
>
>I have two frames, one with left.php in the left frame and one with
>main.php in the right frame.
>
>I refresh the contents of main.hp at the end of left.php. (With help of
>Javascript actually, maybe could be done with HEADER(...))
>
>My Question:
>Is it ALWAYS so that left.php must be executed before the right frame is
>loaded? I wonder this because a session-variable are set in left.php that
>main.php is dependent of. So this session-variable must be set before
>main.php is loaded.
>
>
>/G
>@varupiraten.se
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация