I have problem with ajax in IE(<table> tag)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meodanang
    New Member
    • May 2010
    • 6

    I have problem with ajax in IE(<table> tag)

    I am trying to load pages with ajax. My code runs really well in Firefox. However I got problem with IE. I can't load the page with <table></table> tag on it. IE can load the page with other tags <form>,<b>,<i>. .. with no problem. IE seems to ignore anything between <table></table> tag. I am using IE 8, and trying to load a page with <table> tag into a <div></div>. I don't get any problem with <table> tag in FireFox.
    This is my js for ajax:

    Code:
    function loadPage(url,pageLoaderDivID)
    {
    	if (window.XMLHttpRequest)
      	{
      		xmlObj = new XMLHttpRequest();
      	}
    	else
      	{
      		xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
      	}
    	
    	xmlObj.onreadystatechange=function()
      	{
      		if (xmlObj.readyState==4 && xmlObj.status==200) //4 = loaded, 200 = ok, 400 = fail
    		{
        		document.getElementById(pageLoaderDivID).innerHTML = xmlObj.responseText;
    			//document.getElementById("loadingCheck").innerHTML = '';	
    		}
    	}
    	xmlObj.open("POST",url,true);
    	xmlObj.send();
    }
    Thank you
    Last edited by Dormilich; May 15 '10, 11:44 PM. Reason: Please use [code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    in tables .innerHTML is read-only.

    Comment

    • meodanang
      New Member
      • May 2010
      • 6

      #3
      Originally posted by Dormilich
      in tables .innerHTML is read-only.
      Could you please give a solution for this?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        use DOM methods.

        Comment

        Working...