IE6 strange behaviour with fwrite calls
- From: Carlo Chiari <cialzdesk@xxxxxxxxx>
- Date: Wed, 29 Oct 2008 10:32:51 -0700 (PDT)
Hi devs,
in my application I need to update a simple text file every time the
user checks an item of a radio group.
I use AJAX method to do this stuff.
In the start page I have this code for evely row:
<td><input type="radio" name="CheckMe" onClick='UpdateRecipeID(3);'/></
td>
The UpdateRecipeID() method launches an AJAX request.
function UpdateRecipeID(r_ID)
{
var xmlHttp = getXMLHttp();
var phpUrl;
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
HandleResponse(xmlHttp.responseText);
}
}
phpUrl = "ajax.php?id=" + r_ID;
xmlHttp.open("GET", phpUrl, true);
xmlHttp.send(null);
}
function HandleResponse(response)
{
document.getElementById('ResponseDiv').innerHTML = response;
}
The php code is very simple: (ajax.php)
<?php
require_once("mylibrary.inc.php");
WriteTextFile($_REQUEST["id"],"bridge.txt");
echo "Selezionata ricetta: " .$_REQUEST["id"];
?>
(mylibrary.inc.php)
function WriteTextFile($stream, $fname)
{
$handle = fopen($fname, 'w');
if (!$handle ) {
echo "Cannot open file ($fname)";
exit;
}
fwrite($handle, $stream);
fclose($handle);
}
This source code works fine with Safari 3 and Chrome too, but with IE6
works only for the first three times I click a row.
Anyone knows where's the problem?
.
- Follow-Ups:
- Re: IE6 strange behaviour with fwrite calls
- From: Erwin Moller
- Re: IE6 strange behaviour with fwrite calls
- Prev by Date: Re: Issue with the casting of a SESSION variable
- Next by Date: Re: IE6 strange behaviour with fwrite calls
- Previous by thread: Issue with the casting of a SESSION variable
- Next by thread: Re: IE6 strange behaviour with fwrite calls
- Index(es):