Results 1 to 2 of 2

Thread: loading image in same place

  1. #1
    Join Date
    Jul 2007
    Posts
    59
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Smile loading image in same place

    1) Script Title:
    ajaxtabscontent
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...tent/index.htm
    3) Describe problem:
    i have 3 sub tabmenu and i would like the loading image to be in same place
    is it posible to bring in to <div id="loading">or something like this and every menu will show loading.gif in same place can i do that?

    thank

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure, inside ajaxtabs.js, change the line:

    Code:
    document.getElementById(containerid).innerHTML=loadstatustext
    to something like:

    Code:
    document.getElementById("loadingdiv").innerHTML=loadstatustext
    And add to the below the part in red:

    Code:
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
    document.getElementById(containerid).innerHTML=page_request.responseText
    document.getElementById("loadingdiv").innerHTML=""
    }
    Finally, make sure the loading DIV is defined on your page beforehand:

    Code:
    <div id="loadingdiv"> </div>

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
  •