[thelist] JS - loading an external page

Keith cache at dowebscentral.com
Sat Mar 9 20:19:01 CST 2002


>>In a block of JS (in the HEAD of my HTML page), I load in an external HTML
>>page into an invisible IFRAME (IE) or LAYER (NS).
>>
>>BUT, the trickiness here, is that I need to consider the contents of the
>>externally loaded HTML page *BEFORE* any more of the HTML page is parsed by
>>the browser (I'm actually not wanting to display it at all, in this
>>instance).
>
>That is not possible. This setup won't work. The HTML will be loaded and
>parsed, and it's impossible to stop it except by unloading the page.

The page you are loading, make the entire thing a document.write(). That
way you can do conditional tests on segments of it as it gets written. To
avoid document.write on every line, do the following

document.write('This is a '+
'very long write statement '+
'as it holds an entire segment.')


keith
cache at dowebs.com




More information about the thelist mailing list