Hi,
I am trying to implement the following ajax code:
function create()
{
obj_t = new XMLHttpRequest();
if(obj_t == null)
{
alert("Your broweser does not support it");
}
}
function data()
{
if(obj_t!=null)
{
if(obj_t.readyState == 4)
{
var dv = document.getElementById('tdetail');
dv.innerHTML = obj_t.responseText;
}
}
}
function createRequest(id)
{
obj_t.open("GET","functions/travellerdetail.php?tid="+id,true);
obj_t.onreadystatechange = data;
obj_t.send(null);
}
function showdetail(tid)
{
create();
createRequest(tid);
}
I have called the showdetail function a link click and passed it's id. The problem is that the dv is not updated data. Is there any problem with the link?
Thanks for your time.