Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 13th, 2007, 01:13 AM
Registered User
 
Join Date: Apr 2007
Location: , , .
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">
</table>

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");
        objTR.appendChild(tdNewScreen);

                    tdLoadArea.innerHTML = "";
                    iNextScreenToLoad++;
                    setTimeout(loadNextScreen, iWaitBeforeLoad);
                }
            }
        };
        oXHR.send(null);

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.