Re: [SMARTY] empty frames ... problem still remains
| From: | Joeri van Oostveen | Date: | Sun, 01 Sep 2002 07:14:59 +0000 |
| Subject: | Re: [SMARTY] empty frames ... problem still remains | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5900@lists.php.net to get a copy of this message | ||
templates/{$HEADER} refers to a html file, not really a template, I just put it in there to have them all together
but that is not the one I have problems with ... wish it was, than at least I would know where the problem was...
now I've put
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
in every html file, haven't been able to check if it's ok now, but the people for whom the webapplication is, are behind a proxy, and much of the wasn't getting thru.. this should do the trick? haven't had any complains so far, but I haven't been in contact with because I'm a little busy..
But I hope this will also fix the no content in the lower frame...
when there is a empty frame, I can't view the source of the frame (it just won't respond, no right mouse click etc).. very strange
Joeri
On zondag, sep 1, 2002, at 06:41 Europe/Amsterdam, Jason Sweat wrote:
<frame src="templates/{$HEADER}" name="topFrame" scrolling="NO" noresize > Does templates/{$HEADER} refer to something that renders HTML or is it a template? everything in your frameset needs to reference something the browser can retrieve as valid web page (i.e. a normal HTML page, or a PHP script that uses Smarty to render HTML). a raw template file could very well not be rendered by a browser. HTH Jason ----- Original Message ----- From: "Joeri van Oostveen" <php@klieder.net> To: <smarty-general@lists.php.net> Sent: Saturday, August 31, 2002 4:45 PM Subject: [SMARTY] empty frames ... problem still remains=> 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 -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php