Results 1 to 2 of 2

Thread: IE Error for Ajax Content

  1. #1
    Join Date
    Oct 2006
    Location
    Durban, South Africa
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation IE Error for Ajax Content

    Hi John,

    Tried to implement your suggested change, but I get an error on IE - "document.getElementById(...)" is null or not an object

    Code:
    function loadpage(page_request, containerid){
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
    document.getElementById(containerid).innerHTML=page_request.responseText
    document.getElementById(containerid).scrollTop=0;
    }
    It is located in a scrollable div with id=maincontent and I tried changing the additional line to reflect that, but still no luck.

    Can be viewed at http://www.kirtonauction.co.za/
    Last edited by DelanoSimpson; 12-31-2009 at 09:00 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Note: Moved from thread - http://www.dynamicdrive.com/forums/s...313#post131313

    I moved this because, at least for now, the error appears to have nothing to do with the script mentioned in the above linked post. I don't even think it's a Dynamic Drive script.

    Please post new questions in a new thread like here where I've moved this, and:


    Warning: Please include a link to the DD script(s) in question in your post. See this thread for the proper posting format when asking a question.


    That all said, that error comes from this bit:

    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    var show = 1 
    function blinkit(){
    if (show == 1)  {
      document.getElementById('text').style.color = '#800000'; 
    	show=0; }  
    else {
      document.getElementById('text').style.color = '#CCCCCC'; 
    	show=1;    }
    setTimeout("blinkit();",1000);  // 1000 ms = 1 sec
    }
    //-->
    </script>
    </head>
    
    <body onload="blinkit(); show_clock();">
    There is no element with an id of 'text' on the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •