tags:

views:

75

answers:

5

I've build a website for a client and as we all know 'it works just fine on my machine' :-) as it does on several machines at my clients location. But they have (so far) 3 pc's on wich some errors occur, like cannot find ElementById. These machines are normal up-to-date windows machines running IE8.

When comparing the html-source of the page on my machine with one of a machine on wich the error occurred I found that there seems to be a s--tload of html injected. Loads of DIVS and SPAN around attributes and elementID's and even javascript :

Normal: script type="text/javascript" language="JavaScript"

After injection:

script will be surrounded with a SPAN tag using class 'HTML_ELM'
type will be surrounded with a SPAN tag using class 'HTML_ATR'
"text/javascript" will be surrounded with a SPAN tag using class 'HTML_VAL'

even ID's of html elements are surrounded with these SPAN tags (class='JS_STR') probably causing the problem of cannot find ElementById

I have no idea why this is happening, I also cannot find a cause on google when searching for these weird classnames used by the injected SPAN/HTML tags (HTML_VAL, HTML_ELM, HTML_VAL).

I don't know how to post the html here, but I could if you'd like.

Does anyone here know what could be causing this ?

many thanks, Jurjen.

A: 

Does it work properly if running "Internet Explorer (No Add-ons)"?

Christopher Kelly
A: 

Try running it through html-tidy.

An online tidier can be found at http://infohound.net/tidy/.

Then, it'll be easier to track down the problem. It sounds like malformed html.

CodeJoust
He said that it was working fine on his and several others. so it could me a client issue
Christopher Kelly
CodeJoust
CodeJoust, the html in that link looks very much like what we're experiencing here, however a solution (or source) of the problem is not supplied. thanks for your help though
Jurjen
A: 

Googling span class=HTML_ELM returns lots of results but they've got nothing much in common.

You don't have a syntax highlighter script (or something similar) running on the site by any chance?

Olly Hodgson
No I do not, and if I was and don't know about it, I would expect this problem to occur on every client, not just on some.
Jurjen
+1  A: 

Well, since you are running IE8, are some of the machines in compatibility mode?

Mark Schultheiss
it turns out that on some machines running IE8 this problem occurs, the problem can be resolved by running the site in compatibility mode.
Jurjen
A: 

This extra code comes from the IE8 source viewer. In IE8, if you view source and go to the File menu there are two options under Save, HTML Source and Formatted HTML View. The Formatted HTML View contains all the extra code you are seeing.

spyder94