Background loading javascript into iframe with using jQuery/Ajax?

Posted by user210099 on Stack Overflow See other posts from Stack Overflow or by user210099
Published on 2010-06-11T18:28:54Z Indexed on 2010/06/11 18:32 UTC
Read the original article Hit count: 143

Filed under:

I'm working on an offline only help system which requires loading a large amount of search-related data into an iframe before the search functionality can be used. Due to the folder structure of the project, I am unable to use Ajax-related background load methods, since the files I need are loaded a few directories "up and over."

I have written some code which delays the loading of the help data until the rest of the webpage is loaded. The help data consists of a bunch of javascript files which have information about the terms, ect that exist in the help books which are installed on the system.

The webpage works fine, until I start to load this help data into a hidden iframe. While the javascript files are loading, I can not use any of the webpage. Links that require a small files be downloaded for hover over effects don't show up, javascript (switching tabs on the page) has no effect.

I'm wondering if this is just a limitation of the way javascript works, or if there's something else going on here. Once all the files are loaded for the help system, the webpage works as expected.

function test(){
   var  MGCFrame = eval("parent.parent");
    if((ALLFRAMESLOADED == true)){
        t2 = MGCFrame.setTimeout("this.IHHeader.frames[0].loadData()",1);

}
   else{

  t1 = MGCFrame.setTimeout("this.IHHeader.frames[0].test()",1000);
  }
  }

Load data simply starts the data loading process.

Thanks for any help you can provide.

© Stack Overflow or respective owner

Related posts about JavaScript