PDA

View Full Version : Java Error



Dean
09-06-2009, 12:53 PM
Hey Guys,

I'm having a few problems with this site I do some work on, its showing an error in IE 7 but not in FF.

http://www.coolplates.co.uk/index.php?toOpen=clocks&userid=

Any ideas on it?

Cheers

Dean

Iainm
09-06-2009, 12:58 PM
Turn off Script debugging in advanced options. There is an error in Line 65 apparently


document.faces.src='clocks/blank.gif'

document.faces is null or not an object

Not a Java Expert so dont know what that means , but From My experience most Java Sites have errors so IE turns off debugging by default.

jonbanjo
09-06-2009, 01:12 PM
Although it seems to look OK in Firefox, the error console does show one JavaScript error:

document.faces is undefined Line: 65

Also, it reports this warning in a number of lines:

Error in parsing value for property 'font-weight'. Declaration dropped.

Dean
09-06-2009, 01:25 PM
any ideas how to fix it then, it was working ok with no errors :S

jonbanjo
09-06-2009, 02:05 PM
I'm not that familiar with JavaScript. At a guess, your problem is you are referring to objects in the jst before defining them in the html.

You call JavaScript,

function init_plate(){
document.faces.src='clocks/blank.gif'
document.secondhand.src='clocks/blank.gif'
document.minutehand.src='clocks/blank.gif'
document.hourhand.src='clocks/blank.gif'
}

Having done that, in your html, you go

<div id="clockback">
<img name="clockback" src="clocks/clockback.gif" width="351" height="440">
</div>

<div id="faces" align="right">
<img name="face" src="clocks/blank.gif">
</div>

<div id="secondhand">
<img name="seconds" width="13" height="151" src="clocks/blank.gif">
</div>
<div id="minutehand">
<img name="minute" width="94" height="67" src="clocks/blank.gif">
</div>
<div id="hourhand">
<img name="hour" width="42" height="64" src="clocks/blank.gif">
</div>