bendan wrote:
> the site http://www.blueservo.net/camload.php?camid=1&frameid=1 works fine
> with IE7 but is broken with IE8.
> The Developer tools supplied with IE8 has a validate function and that shows:
> 48 Errors, 12 warning(s) for the page.
>
> Did they change the rules for HTML?
Web pages often check which web browser is rendering the page. Due to
differences in HTML (usually in what attributes are supported) and in
DOM, web pages have to react differently. For example, the
window.navigate(<href>) method works in IE but not in other web browsers
so window.location.href = <href> should be used instead.
When I visited the web page, the error said the _gat object had not been
defined. That means some code tried to use the _gat object but the
coder neglected to define it beforehand.
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-6121754-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
Okay, so just where is the _gat object defined so it can be used later
to call its _getTracker() method? Maybe it's defined in a separate .
js
file that is supposed to write to the current document (web page) but
the file could not be found. For example, just before the above script
section, there is another to load a file:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.
js' type='text/javascript'%3E%3C/script%3E"));
</script>
So what if the ga.
js file could not be found? If it defined _gat but
the file didn't load then the _gat object is undefined hence the error.
The web page you are visiting is using Google Analytics to track their
visitors. I'm not a Javascript expert. If the document.write() returns
a status code, they should've used it to check if the write to the web
page (of the retrieved script file) actually worked or not.
The web page author probably just copied and pasted code they were given
by Google. That doesn't mean it is good code with graceful recovery.
The validation of which you speak (which is sending the web page to W3's
validate page) shows lots of errors, many of which are due to the web
page author deciding to use a doctype of "XHTML 1.0 Strict". That was a
bad choice since the author decided to use attributes in tags and other
elements that are not allowed under that doctype. For example, the
color attribute in <font color=<somecolor> ...> is not valid. They
should've used TRANSISTIONAL to support the old attributes that are
obsoleted. That the attribute is invalid under Strict mode doesn't mean
a web browser will not use it. There seems to be quite a bit of
sloppiness built into most web browsers. A lot of errors you see from
W3's validation are due to the web author selecting an restrictive
document type but using a style in his coding that uses obsoleted tag
attributes.
A lot of the errors and warnings at W3's validator page can be ignored
but it appears the web author should change to Transitional for doctype.
The web page *looks* okay to me. You never bothered to describe what
"broken" means to you. I did not actually try to login since I don't
have an account there and don't want one. Looks the same in both IE8
and Firefox3.
By the way, this page creates an account and records your personal
information. It is NOT a secured page for their web form (SSL isn't
used, it isn't an https:// page). The form's action does not send its
data to an https:// page (to ensure the data transmitted goes to a page
that first does the SSL handshaking). Yeah, some secure page that is
for creating an account ... NOT! The web author needs to do some work.