A
Andrew Clark
Hello,
I have a webpage to search a database. When the results are returned
from the query, they are written to a temporary file so I can include
them as a javascript source file. On any subsequent query, the correct
recordset is written to the file, but the results on the page are not
updated due to (I suspect) caching in internet explorer. Here is an
example:
search.html
--
<IFRAME SRC="blank.html" NAME="dataiframe"></IFRAME>
[...]
<FORM ACTION="getdata.php" METHOD="post" TARGET="dataiframe">
<INPUT TYPE="submit"
</FORM>
getdata.php
--
// perform a query and write to a file here
$filename = "tmp/some distinct file name";
echo "<SCRIPT TYPE=\"text/javascript\" SRC=\"tmp/$filename.js\">";
echo "</SCRIPT>";
Each time the database is queried, the IFRAME is reloaded. The .js file
is created correctly (looking at the .js file, the values reflect the
new recordset), but the new data never shows up. The first data set is
the only one to ever show up. I think the contents of the javascript
file are cached and IE never bothers to reload it. How should I deal
with this problem?
Thanks,
Andrew
I have a webpage to search a database. When the results are returned
from the query, they are written to a temporary file so I can include
them as a javascript source file. On any subsequent query, the correct
recordset is written to the file, but the results on the page are not
updated due to (I suspect) caching in internet explorer. Here is an
example:
search.html
--
<IFRAME SRC="blank.html" NAME="dataiframe"></IFRAME>
[...]
<FORM ACTION="getdata.php" METHOD="post" TARGET="dataiframe">
<INPUT TYPE="submit"
</FORM>
getdata.php
--
// perform a query and write to a file here
$filename = "tmp/some distinct file name";
echo "<SCRIPT TYPE=\"text/javascript\" SRC=\"tmp/$filename.js\">";
echo "</SCRIPT>";
Each time the database is queried, the IFRAME is reloaded. The .js file
is created correctly (looking at the .js file, the values reflect the
new recordset), but the new data never shows up. The first data set is
the only one to ever show up. I think the contents of the javascript
file are cached and IE never bothers to reload it. How should I deal
with this problem?
Thanks,
Andrew