Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Erorr on Line

Status
Not open for further replies.

site4sure

IS-IT--Management
Aug 15, 2002
171
US
Hi,

We are working on a new site, and a majority of it is done in PHP. We are getting an error in IE6 on a line that doesnt exist, but in Firefox and the other browsers no error. We are having trouble tracking it done because of what line it is on. Please help. Here is the page:

 
The error is happening on line 322 of "/new/components/transmenus/transmenu.js":

Code:
elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px";

and is because ow =1, TransMenu.shadowOffset = 3, and thus you are trying to set a width of 1-3 == -2 - which is not valid as a width (must be positive).

Either correct your values, correct your logic, or put a Math.max around the whole lot (I'd go with one of the first two, preferably - fixing is better than patching):

Code:
elmCache["shadowBottom"].style.width = Math.max(ow - TransMenu.shadowOffset, 0) + "px";

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top