empty frames ... problem still remains

From: Date: Sat, 31 Aug 2002 21:45:26 +0000
Subject: empty frames ... problem still remains
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5894@lists.php.net to get a copy of this message
=> I posted this problem before, but the problem still remains.. and it was vacation time when I posted this message first, so I'll try again :) and I still haven't solved the problem... I'm building a webapplication using smarty,.. but I'm encountering a strange bug (don't know if it's smarty or not). case: on the login page, there are 3 groups of people who can log in (all in the same login box), so there is a switch... after login in (one frame), another page is loaded with 2 frames. sometimes the lower frame (the one that's processed by smarty) stays empty.. (this only happens after a login)... It looks like it only occurs using Internet Explorer (mac & pc) but I'm not sure. and something else, sometimes a wrong top frame is loaded, but I haven't encoutered that in a while. ok, let's bring in some code... the framed template (main2.html): <html stuff> <frameset rows="90,*" frameborder="NO" border="0" framespacing="0"> <frame src="templates/{$HEADER}" name="topFrame" scrolling="NO" noresize > <frame src="{$MAINFRAME}" name="mainFrame"> </frameset> <noframes> </html stuff> piece of the main.php code after log in (in a switch). (main.php - is a smarty driven page) // $isFirst is a variable to check this is the first page to displayed after login in. // it loads the frameset, displays it and exists because otherwise more code it uselessly executed if ($isFirst == "yes") { $isFirst = "no!"; session_register('isFirst'); $tpl->assign(array( "TITLE" => "[BIS] Fuel", "HEADER" => "header_editorial.html", "MAINFRAME" => "main.php" )); $template = "main2.html"; $tpl->display($template); exit(); } else { // $frame -> if the whole page needs to change (all frames), this is the place where it happens, no problems encoutered here if (isset($frame)) { $header = "header_".$frame.".html"; $mainframe = "main.php?action=".$frame; $tpl->assign(array( "TITLE" => "[BIS] Fuel", "HEADER" => $header, "MAINFRAME" => $mainframe )); $template = "main2.html"; $tpl->display($template); exit(); } else { // *) // here the MAINFRAME stays empty sometimes using IE (viewing source of page displays -> <html></html>) // could it be a problem because of an include in an include? // but only just after loging in and no problems browsing after loging in, then this code is used just as often. include('sub.editorial.php'); } } // this page is the main.php page, so as you can see the frame thing calls itself (sort of) MAINFRAME -> main.php .. // so when main.php is loaded a second time, the frame is no longer set (now it is $action) *) I know this part is being processed, because just before displaying the template I have this piece of code: if (!isset($template) || $template == "") { $tpl->assign("TITLE","bis - error"); $template = "error.html"; session_destroy(); session_unset(); } $tpl->display($template); so why doesn't it show anything? I don't know, all I can think of is that or smarty's caching does something bad (don't think so, because after rm -R /templates_c/ the problems stays) or (most likely) internet exploder doesn't want the html... but only direct after login in... If you need some more code, please say so, because I can' t find the problem... thanks in advance Joeri

« previous php.smarty.general (#5894) next »