Forum Moderators: open
So before I begin crying let me get to my "problem," that in my mind there is not one but I have a boss and it's a problem...
The following URL when opened in IE has the 'Done Error' (Web page error in the Internet Explorer status bar) and I have gone the extra step to have the page validated and it comes back green "pass" at validator.w3.org
I need the page to open on the first time without an error.
(What doesn't make sense to me is how internet explorer first renders the page by displaying that error message - but once refreshed the error message goes away. I tried refreshing the same page loads of times to see if the error comes back but it doesn't. The page is rendered correctly.)
The line it says is an error is a duplicate, but if it is removed it just gives me some other error line that is a .img file; I love IE
[edited by: tedster at 1:56 am (utc) on June 3, 2009]
[edit reason] no personal urls, thanks [/edit]
The following URL when opened in IE has the 'Done Error'
This is not a validation error. This is an error in scripting. But fear not, validation is *always* a good thing, it assists cross-browser compatibility by rendering in Standards Compliance Mode.
What doesn't make sense to me is how internet explorer first renders the page by displaying that error message - but once refreshed the error message goes away.
Pages load top-down.
Your Javascript is called first, as in a link from the head of the document, or the Javascript itself is in the head of the document, and is acting on a page object, such as a div, link, mouseover image.
But the object on the page is not yet loaded.
Hence the error.
But now that it's cached, when you refresh, it will locate and reference the div.
Am I close? The solutions are:
1. window.onload=function() { functionReferringToPageObjects(); };
2. Put your JS include/in-page JS at the bottom of the page, just before the closing body tag. This allows all page elements to load first.