Originally posted by acoder
Hi
probably i had also used the same script in my page., but when i click the ajax link in my page., it displays the alert message "ur browser does not support ajax"
Here is my code:
Code:
<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.XMLHTTP") } catch(e) { alert("ur browser doesnot support Ajax"); return false; } } } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4) { document.getElementById("ajax").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajax.php?id="+id+"&action="+action,true); xmlhttp.send(null); } function hidden(id,action) { httprequest(id,action) } </script>
<div id="ajax">
<table >
<tr>
<td>------Place where i fetch data from another page and display---------</td>
<td><a onclick="hidden ('10','next')"> next</a></td>
</tr>
</table>
</div>
[/code]
and in my ajax.php page i hav displayed datas fetched from database which are above the id(10) i sent on onclick event;
but when i click the ajax(next) link., i get an alert message
"ur browser doesnot support Ajax"
in ie5 and ie6;
but its working well with ie7 and firefox.,
and i had even tried changing the id name from "ajax" to someother string., but nothing happened.,
could u help me to get rid of the problem.,
kind regards
vijay
Comment