“Unknown runtime error” in IE8 while using ajax
Internet Explorer / Firefox Issues, Technology November 24th, 2010Problems with Internet Explorer don’t seem to have an end…Recently I came across a few problems while using IE 6 & a few friends told me to “Screw that” and move on to IE 8 as it is much like Firefox with an inbuilt debugging tool & ofcourse with lesser issues than IE 6. Trusting them, I did move to IE 8.
But one problem that was persistent across both IE 6 & IE 8 was a simple AJAX functionality that used to work in Firefox but not in IE 6 or IE 8.
I discovered that the AJAX call was working fine & the response was also being returned same in both browsers, but the issue was while updating the element after getting the response. The element in question here was a table i.e. I had code like:
<table id=’id_to_update’>
It was giving me an error “Unknown runtime error”.
I was trying to find a solution to this & found quite a few options like changing the case of XMLHTTP to XMLHttp, of trying to create an ActiveXObject before creating an XMLHTTP object. I tried all that, but didn’t work. Later I found that in IE, it is not possible to update a ‘table’ content through ‘innerHTML’. It worked only after I put the table inside a ‘div’, so the code was:
<div id=’id_to_update’>
<table>….</table>
Where the “<table>, </table>” part was the one that was being updated through AJAX.
Related posts:





Recent Comments