I have been trying to resolve this issue for a few days now but I just cant get it. The following works intermittent :glare: . I have a toggle display option on one of my pages that use an XMLHttpRequest to a PHP query. I have already read the article on PHPBuilder and a few other places but I cannot find anything that would help me.
Here is the index.php section that calls the XMLHttpRequest.
function ToggleDisplay(FactID) {
Cell = "dis"+FactID;
var obj = (document.getElementById) ? document.getElementById(Cell):(document.all)?document.all[Cell]:null;
if (obj) {
if (obj.innerText == "Display: Yes") {
obj.innerText = "Display: No";
sendString = 'dynamicUpdate.php?Action=ToggleDisplay&Other=False&FactID='+FactID;
} else {
obj.innerText = "Display: Yes";
sendString = 'dynamicUpdate.php?Action=ToggleDisplay&Other=True&FactID='+FactID;
}
}
req = new ActiveXObject('Microsoft.XMLHTTP');
req.open('get', sendString);
req.send(null);
}
I am only allowing users to use IE5+ and that is why I only create a new instance of ActiveXObject('Microsoft.XMLHTTP');.
Here is the dynamicUpdate.php (simple., easy, and affective):
<?php
$query = "UPDATE facts SET Display = ".$_GET['Other']." WHERE FactID = ".$_GET['FactID'];
$conn = odbc_connect('****', '****', '****');
odbc_exec($conn, $query);
odbc_close($conn);
?>
Any light that could be shed on this problem would be MOST appreciated,
Abarak