Forum Moderators: open
I have a few lines of code almost exactly like this elsewhere in the page,but this is the only line that IE is saying is an error.
I also checked my page at the W3 Validator and I this was not listed as an error.
Thanks in advance for any input!
...Should I assume that IE6 isn't liking the " title="French Production Company" onmouseover="d(this)" onmouseout="e(this)" alt="Br Films" /> part of the code?
No, it is quite likely that this line of code is perfectly OK. It is certainly valid. And like you say, "It does its job in both IE and FF".
When do you get your error? Do you get your "error on page" message as soon as your page loads? If yes, then it is certainly NOT your line of code above that is causing the problem. Your line of code above could only generate an error if you moved your mouse over/off it - but I guess it doesn't, as like you say, "it does its job".
Are you sure that FF is not generating a JS error too? Have you checked the JS console? (Small icon top-right of window that shows an exclamation mark (!) if an error has occurred.)
IE6 does not correctly report which file the JS error is occurring. Do you include external JS files? Line#96 is most likely refering to one of these other files.
...a weird bug in a Wiki package that was developed by some Russians, and it had a lot of Cyrillic comments in the code.Only IE6 had an issue with them, but I needed to nuke the comments to make IE6 happy.
cmarshall, just to clarify... you had an external JS file, with Cyrillic JS comments... and that caused IE6 to spit out a JS error? What kind of error? Or was it an erroneous error?! ;)
Did you have a 'charset' attribute on the script element?
The error does not occur in IE until I scroll over any of the hotspots which have similar JS...
Ahh, OK. Your hotspots call two JS functions: one in the onmouseover event, simply called "d" and the other in the onmouseout event, simply called "e". These are used, I presume, to produce your pop-up? These two functions must be defined somewhere (perhaps in an external JS file?) and it is within one (or both) of these functions that the error is occurring.
They will be defined somewhere like....
function d(obj) {
// Rest of function d ...
} function e(obj) {
// Rest of function e ...
}
Are you able to identify these functions in your code? Which is line 96? ...and possibly paste the code back here?
Here is the start of their code: <div id="pixels" style="z-index:1">
<map name="Map" id="Map">
<area onmouseover="d(this)" onmouseout="e(this)" shape="rect" coords="630,310,640,320" href="http://www.***.net" title="***.net, stock photography"/>
<area onmouseover="d(this)" onmouseout="e(this)" shape="rect" coords="850,50,860,60" href="http://www.****.com" title="****.com"/>
<area onmouseover="d(this)" onmouseout="e(this)" shape="rect" coords="390,280,420,310" href="http://www.*****.com/" title="PC infected? Free Spyware Scan - *****"/>
cmarshall, just to clarify... you had an external JS file, with Cyrillic JS comments... and that caused IE6 to spit out a JS error? What kind of error? Or was it an erroneous error?!
The package was a modification of WikiEdit, which is a common package used by a couple of wikis. I have a feeling that it may have undergone a character set transformation during its journey around the office.
Yeah, it was an external .js file, and the characters showed up as garbage characters in my text editor. I didn't have any kind of charset attribute on it.
It does its job in both IE and FF
--
I am using this because I need the little pop-up box with the message when you scroll over the hotspots.
--
hmmm, no, actually there isn't anything like that. I took the JS code from a page I found using this pop up function and their page does not have it either.
Presumably, "it does its job", means that it does actually work (ie. the required effect happens) in the browser? 'Something' pops-up? What exactly "pops-up"?! Does your popup work the same as the popup on the page you copied the code from?
I am rather intrigued, as if "there isn't anything like that", ie. no actual functions called d() or e() elsewhere in your code, then your onmouseover/onmouseout events will do nothing (other than give an error!) - I fail to see how anything can "pop-up"?! As far as I'm aware, d() and e() are not magic functions and do not exist 'naturally' in JS.
The only thing that might popup is a standard 'tooltip' (ie. little pop-up box) with the contents of the title attribute. If this is all you require, then you can simply delete the onmouseover="d(this)" onmouseout="e(this)" part, as it it not being used, and you will get rid of your error?! Hhmmmm?