![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| ||||
| ||||
|
|
"Grant Wagner" <gwagner (AT) agricoreunited (DOT) com> wrote: I don't believe that is true is it? You are, in fact, correct. My mistake, I apologize. See: http://www.mattkruse.com/cgi-bin/nph-test.pl It was my understanding that javascript waited until the document was delivered, then began a pre-scan to execute inline javascript (such as document.write calls), then build the document tree, then began calling events. This is apparently not the case ![]() |
|
Also, if what you say is true, you would not be able to dynamically write content into the <body> while the page is loading: That's not necessarily true, though. If the browser did a pre-scan of the document to execute inline javascript, before parsing the resulting html, document.write calls would still be possible. |
|
I suppose one could argue that the browser doesn't render the results of a page like that shown above until the connection was closed and the entire document delivered, but even that doesn't seem to be the case, many browsers begin rendering content before the entire document is delivered. Depending on the browser, though, you may not actually have access to the contents of the document until the whole thing has loaded. So even using javascript to call a function which will modify the screen display may not work, because the whole document object is not yet available until after the whole thing loads (in some browsers). |
|
Grant Wagner <gwagner (AT) agricoreunited (DOT) com |
#2
| |||
| |||
|
|
Matt Kruse wrote: snip That's not necessarily true, though. If the browser did a pre-scan of the document to execute inline javascript, before parsing the resulting html, document.write calls would still be possible. I realized that after I posted my reply and you are absolutely correct. snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |