MadnessRed Posted December 6, 2009 Share Posted December 6, 2009 If a problem that a script is not colouring a number as expected. I have this if(a >= b){ colour = 1 }else{ alert(a + '<' + b); } however, it returns an alert saying 12349414.9041 < 15000 Any idea as to why this might be happening? actually i think I have worked it out, it is reading teh vaues as string and < refers to its alphabetic position, eg 'aa' < 'z' '11' < '9' I have done a parseFloat and that sorted it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.