Login Register

dojo.io.bind bug with MSI Explorer ??

[EDIT: Moving to the appropriate forum.]

Hi, First of all the strange thing is that my code works perfectly fine with other browser except MSI Exploer. I simplified the code as much as I could:

<script type="text/javascript">
function ReplaceItAll(typeId)
{
        var divName1 = 'ToReplace';
        var actionJSP1;
        actionJSP1 = 'blank1.html';
       
                dojo.io.bind ({
                url: actionJSP1,
                handle: function(type, data, evt)
                {
                        var returnObj = document.getElementById(divName1);
                        returnObj.innerHTML = data;         
                }
        });
}
</script>
<head>
<script language="JavaScript" src="../js/dojo.js" type="text/javascript"></script>
</head>
<body onload="ReplaceItAll(12)">
        <div>
        <form>
        <table>
        <span id="ToReplace">
        testing
        </span>   
        </table>
        </form>
        </div>
</body>

and blakn1.html is as follow:

<head>
<title>New Page</title>
</head>
<body>
<form>
  <div>
Testing innerHTML
  </div>
  </form>
</body>

All other browsers show properly the content from blank1.html However it does not work with explorer. Well it returns me [object Object] on the page. The second strange thing is that when i take out span id="ToReplace" from DIV it works... Any idea ? tips ? something i am doing wrong ?

Using innerHTML in IE within

Using innerHTML in IE within a table has problems in IE. And the above is a malformed table too: a span is not normally considered a direct child of a table tag. I believe it works better in IE if you do an innerHTML with a string that includes a complete table, with table and /table tags.