PDA

View Full Version : Do you get JS warnings with FF2 on this page?



jlizarraga
09-02-2008, 04:25 PM
http://www.autofusion.com/development/mm3/inventory.html

Not a big deal, just wondering if you see javascript warnings in the error console on this page. It doesn't appear to affect functionality. Thanks!

I see the following warnings from work, but not from home:

Warning: anonymous function does not always return a value
Source File: http://yui.yahooapis.com/2.5.2/build/dom/dom-min.js
Line: 7, Column: 136
Source Code:
yle.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q])

Warning: test for equality (==) mistyped as assignment (=)?
Source File: http://yui.yahooapis.com/2.5.2/build/dom/dom-min.js
Line: 8, Column: 69
Source Code:
entWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,

BLiZZaRD
09-02-2008, 04:43 PM
I don't see any errors or warnings in JS or CSS.

Tested FireFox2, 3 and Konq on Linux box.

jlizarraga
09-02-2008, 04:59 PM
Sweet, I'm Linux-friendly! :)

clueful
09-03-2008, 02:57 AM
http://www.autofusion.com/development/mm3/inventory.html

Not a big deal, just wondering if you see javascript warnings in the error console on this page. It doesn't appear to affect functionality.
It wouldn't affect functionality because these are warnings about potential errors due to poor programming practice. The reason some copies of Firefox won't show them is because they can be toggled in about:config. Type javascript into the filter box then toggle javascript.options.strict

This example would generate both the warnings you mention:
<script type='text/javascript'>

function slapdash()
{
var v;

if( v=1 )
return 1;
}

slapdash();

</script>