Hi, I am having difficulty understanding how innerHTML function works in Internet Explorer. I have a link where on click, calls a ajax function and the textresponse of the ajax is set i use below code for innerHTML. it's works fine in Mozilla and Chrome But not works in Internet explorer document.getElementById("txtHint").innerHTML= document.getElementById("txtHint").innerHTML + xmlhttp.responseText; Please help me
If your using a name tag both id="txtHint" and name="txtHint" tags must be the same. Although the problem might be something else, post your form code for better advice from other members.
I only use id="txtHint".. <table id="txtHint" width="100%" border="0" cellspacing="5" cellpadding="0"> info will be listed here </table> Click on Add team link then below function call function showPlayer(team_id) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML= document.getElementById("txtHint").innerHTML + xmlhttp.responseText; } } xmlhttp.open("GET","ajaxfile/getplayeredit.php?team_id="+team_id,true); xmlhttp.send(); } It's working fine in Mozilla and Chrome But it's not working IE.... Thank you for reply me