hi
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,
here is my javascript code.,
[HTML]<script type="text/javascript">
var id;
var action;
function httprequest(id, action)
{
var xmlhttp;
try
{
xmlhttp=new XMLHttpRequest( );
}
catch(e)
{
try
{
xmlhttp=new Activexobject(" Msxml2.XMLHTTP" );
}
catch(e)
{
try
{
xmlhttp=new Activexobject(" MICROSOFT.XMLHT TP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}
}
xmlhttp.onready statechange=fun ction()
{
if(xmlhttp.read yState==4)
{
document.getEle mentById("ajax" ).innerHTML=xml http.responseTe xt;
}
}
xmlhttp.open("G ET","url/"ajax.php?id="+ id+"&action="+a ction,true);
xmlhttp.send(nu ll);
}
function hidden(id,actio n)
{
httprequest(id, action)
}
</script>
<table id="ajax">------Place where i fetch data from another page and display---------
<tr><td><a onclick="hidden ('1','next')">n ext</a></td></tr>
</table>
[/HTML]
Could anyone help me.,
Thanks.,
vijay
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,
here is my javascript code.,
[HTML]<script type="text/javascript">
var id;
var action;
function httprequest(id, action)
{
var xmlhttp;
try
{
xmlhttp=new XMLHttpRequest( );
}
catch(e)
{
try
{
xmlhttp=new Activexobject(" Msxml2.XMLHTTP" );
}
catch(e)
{
try
{
xmlhttp=new Activexobject(" MICROSOFT.XMLHT TP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}
}
xmlhttp.onready statechange=fun ction()
{
if(xmlhttp.read yState==4)
{
document.getEle mentById("ajax" ).innerHTML=xml http.responseTe xt;
}
}
xmlhttp.open("G ET","url/"ajax.php?id="+ id+"&action="+a ction,true);
xmlhttp.send(nu ll);
}
function hidden(id,actio n)
{
httprequest(id, action)
}
</script>
<table id="ajax">------Place where i fetch data from another page and display---------
<tr><td><a onclick="hidden ('1','next')">n ext</a></td></tr>
</table>
[/HTML]
Could anyone help me.,
Thanks.,
vijay
Comment