You are here: Generated file « PHP Programming Language « IT news, forums, messages
Generated file

Posted by Andrew Clark on 11/27/05 20:36

Hello,

I am 99% sure that the problem I am having is not PHP related, but to
remove my doubt, I am posting here.

I have a search page (interfacing with MySql) that displays results in an
IFRAME on the search page. I did this so the whole page would not have to
be reloaded on each query.

Each time I query the DB, I write the result set to a file and include this
file as javascript source on the results page. Up to this point everything
works fine, which is why I say I don't think this is PHP related.

I use javascript to "walk" the recordset. In internet explorer (only), the
first query recordset is all that is ever seen by the search page, even
though the javascript source file is correctly generated. Maybe this is a
little opaque so I will give an example.

search.html
--
<IFRAME NAME="dataiframe" SRC="blank.html"></IFRAME>
[...]
<FORM ACTION="display.php" METHOD="post" TARGET="dataiframe">
<INPUT TYPE="submit">
</FORM>

display.php
--
session_start ();
$filename = "tmp/" . session_id () . ".js";

// write recordset...
// include here
echo "<SCRIPT TYPE=\"text/javascript\" SRC=\"$filename\">

--
This file is always generated correctly. The problem arises when the
browser (IE) does not use the updated values in $filename. It is my belief
that IE caches the values in this file and when the frame is reloaded, IE
tries to be "smart" and sees that I am including the same file, and
therefore does not reload from the file but from its cache.

Now that I think about it, since the file is being correctly generated,
this is 100% NOT PHP related. Could someone shed light on this anyway? It
would be much appreciated.

Thanks,
Andrew

 

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

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