homepage Welcome to WebmasterWorld Guest from 54.237.38.30
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Error Icon in IE6
Getting a code error in IE6
Preeminent

5+ Year Member



 
Msg#: 3219375 posted 1:41 am on Jan 15, 2007 (gmt 0)

Hi everyone,
Been browsing the site for a while now, but this is my first time posting. My question is this: When I check my current project in Internet Explorer 6 I get a little "error on page" message in the bottom left tray. I double click it and it says: line: 96, char: 1, Error: Object Expected, Code: 0 . Here is my code from Line 96: <area shape="rect" coords="158,370,189,387" href="http://www.blahblah.com" target="_blank" title="French Production Company" onmouseover="d(this)" onmouseout="e(this)" alt="Br Films" />

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!

 

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3219375 posted 6:26 am on Jan 15, 2007 (gmt 0)

IE is not reporting an html error, but rather a javascript error. Validation doesn't ensure that scripts related to the page will run, but only that the html is valid.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3219375 posted 11:57 am on Jan 15, 2007 (gmt 0)

...and it says: line: 96, char: 1, Error: Object Expected,...

That maybe line 96 in an external javascript file that you are including in the page, rather than the page itself.

Preeminent

5+ Year Member



 
Msg#: 3219375 posted 9:56 pm on Jan 15, 2007 (gmt 0)

thanks for the replies! 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? It does its job in both IE and FF, but I just get that error in IE. I just hate to know that someone who is using IE will see that.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3219375 posted 11:22 pm on Jan 15, 2007 (gmt 0)

...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.

cmarshall

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3219375 posted 11:48 pm on Jan 15, 2007 (gmt 0)

Funny you should mention this...

I just today fixed 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.

Preeminent

5+ Year Member



 
Msg#: 3219375 posted 12:06 am on Jan 16, 2007 (gmt 0)

The error does not occur in IE until I scroll over any of the hotspots which have similar JS . So when the page first loads, no, the error isn't there. As far as FF goes, I do not see anywhere in the browser that is showing an error. I am using this because I need the little pop-up box with the message when you scroll over the hotspots. Thanks again for the replies.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3219375 posted 12:13 am on Jan 16, 2007 (gmt 0)

...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?

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3219375 posted 12:30 am on Jan 16, 2007 (gmt 0)

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?

Preeminent

5+ Year Member



 
Msg#: 3219375 posted 12:57 am on Jan 16, 2007 (gmt 0)

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. Their page does load and the rollovers produce no error. odd

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

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3219375 posted 2:23 am on Jan 16, 2007 (gmt 0)

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.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3219375 posted 2:46 am on Jan 16, 2007 (gmt 0)

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?

Preeminent

5+ Year Member



 
Msg#: 3219375 posted 8:53 pm on Jan 16, 2007 (gmt 0)

haha, Well I feel like a complete idiot now! Yeah I did not need that JS to get what I needed. No more Error. Thanks for taking the time to help-Thank You Very Much!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved