Wrox Programmer Forums
BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6
This is the forum to discuss the Wrox book Professional Ajax, 2nd Edition by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780470109496
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 13th, 2007, 01:13 AM
Registered User
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to adfranklin
Default Problem using innerHTML

I'm trying to adapt the predictive fetch pattern in Chapter 3 to my application and find that IE7 barfs when trying to load fetched HTML code into a TD element using innerHTML. It works fine in Netscape 8. I've searched the web looking for something to tell me that this is a known bug but I can't find anything. Can anyone tell me if this is a known bug in IE7 and if there's a work around for it, if so.

My code looks like this:
HTML page code:
<table id="tblLoadArea" style="display:none" >
    <tr id="tdLoadArea">

JavaScript code:
        oXHR.open("get", getURLForScreen(iNextScreenToLoad) + "&dataonly=true", true);
        oXHR.onreadystatechange = function () {
            if (oXHR.readyState == 4) {
                if (oXHR.status == 200) {
        window.alert("loading screen" + iNextScreenToLoad); This alert works
                    var tdLoadArea = document.getElementById("tdLoadArea");
        window.alert("Got tdLoadArea");This alert works
                    tdLoadArea.innerHTML = oXHR.responseText;
        window.alert("have set tdLoadArea");IE7 crashes before this alert

                    var tdNewScreen = document.getElementById("tdScreen" + iNextScreenToLoad);
             if (!tdNewScreen) {
            window.alert("no screen found for id: tdScreen" + iNextScreenToLoad);
                    tdNewScreen.style.display = "none";

        objTR = document.getElementById("screenRow");

                    tdLoadArea.innerHTML = "";
                    setTimeout(loadNextScreen, iWaitBeforeLoad);

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with IE's innerHTML and <form> tags??!?! nebulus Javascript 1 February 15th, 2006 05:08 PM
abusing innerHTML ophillip Javascript How-To 3 July 21st, 2005 02:21 AM
Getting InnerHtml ghari Javascript 3 January 3rd, 2005 12:06 PM
innerHTML interrupt Javascript How-To 6 July 22nd, 2004 02:18 PM
innerHTML problem higgsy Javascript How-To 2 August 7th, 2003 07:33 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.