s0c0 Posted September 14, 2007 Share Posted September 14, 2007 I'm sure this has been asked before, but I'm asking again. What is the work around for this apparent bug? I have this snippet of code that works fine in FireFox, but throws an error in IE. /* try { var txtDocument = XMLHttpRequestObject.responseText; var totalsArr = txtDocument.split('-'); document.posfrm.total.value = totalsArr[0]; document.getElementById("total").innerHTML = totalsArr[0]; subTotalFrm.value = totalsArr[1]; taxFrm.value = totalsArr[2]; taxDiv.innerHTML = totalsArr[2]; shippingFrm.value = totalsArr[3]; shippingDiv.innerHTML = totalsArr[3]; infoDiv.innerHTML = totalsArr[4]; setShippingValues(totalsArr[4]); } catch(err) { alert("error getting order total amount"); } I've read several blogs, and even this KB (http://support.microsoft.com/kb/276228), but I can't seem to get any of the work arounds for this to work. Is there any easy work-around, please say yes, because I really don't want to "fix" over 1000 lines of JavaScript. P.s. Your boss tells you not to worry about IE compatibility, once you complete the project he comes back and says we need it to be IE compatible....go figure, thanks! Quote Link to comment Share on other sites More sharing options...
s0c0 Posted September 17, 2007 Author Share Posted September 17, 2007 Wow no replies on this. I figured out a solution on my own. My problem was I was setting up ID names on TD tags which for some reason causes IE to error out. I got rid of those, and replaced them with span ID names, this resolved the problem. For instance if you have the following code: <script type="text/javascript"> var str = "hello world"; document.getElementById("text").innerHTML = str <script> And the following HTML: <table> <td id="text"></td> </table> This will not work, you must instead use <span id="text">, <div id="text">, or something like that to remain IE compatible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.