Problem in IE data fetching

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mvn_2007
Forum Newbie
Posts: 2
Joined: Thu Nov 26, 2009 5:51 am

Problem in IE data fetching

Post by mvn_2007 »

Hello Sir,

May I ask help, because I am encountering problem in AJAX php in IE. In mozilla fire fox when I update the data and refresh it true ajax it usuall views the updated data. But in Internet explorer when I update the data, the data in the database was updated but in the browser it still showing the old data and not the new one. example "1" is my old data and I update it to "2" in the data base. The data in the data base was changed to "2" but when I fetching it to IE it's still "1" please post some advice regarding this. I also notice that I need to close my browser for me to see the updated data.
User avatar
el_gato
Forum Newbie
Posts: 12
Joined: Sun Oct 18, 2009 9:28 pm
Location: Bandung
Contact:

Re: Problem in IE data fetching

Post by el_gato »

The problem is on your client side script (java script), could you post it here ?
mvn_2007
Forum Newbie
Posts: 2
Joined: Thu Nov 26, 2009 5:51 am

Re: Problem in IE data fetching

Post by mvn_2007 »

Thanks elgato here is the code on my javascript that used to be called during that action. it is usually normal in mozilla but in IE the new data that was updated on my database was not updated on my browser. Even that the data on the data based was already changed it still show the old data in IE.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
return xmlHttp;
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
return xmlHttp;
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
return xmlHttp;
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
}

request = ajaxFunction();


function edituser()
{
request.open("get", "process/edituser.php");
request.onreadystatechange = output3;
request.send(null);
}


function edituserprocess(num,status)
{
a="user"+num;
b="pass"+num;
c="level"+num;
user = document.getElementById(a).value;
pass = document.getElementById(b).value;
level = document.getElementById(c).value;
var question = confirm('Do you really want to \''+status+'\' this data');
if(question == true)
{
request.open("get", "process/edituserprocess.php?x="+num+"&user="+user+"&pass="+pass+"&level="+level+"&status="+status+"&rand1="+Math.random());
//request.onreadystatechange = output3;
request.send(null);
if(status == 'EDIT')
{
var status1 = 'UPDATED';
}
else
{
var status1 = 'DELETED'
}
alert('Data was successfully '+status1)
}
edituser();
}
Post Reply