If, driving me nuts. Need help please.

What is wrong with this? Giving me the wrong color some times.
if (Number(resulta.text) <= 18.99)
  comment.text = ("blue!");
else if (19<=Number(resulta.text) <=24.99)
  comment.text = ("white!");
else if ( 25< Number(resulta.text)<=29.99)
  comment.text = ("red!");
   else
  comment.text = (" black!");

You also might want to change your comparisons slightly so as not to fail between values...
if (Number(resulta.text) < 19)
if (19<=Number(resulta.text) && Number(resulta.text) < 25)
etc...

Similar Messages

Maybe you are looking for

  • DOBJ.UPDATE_FAILED error while attaching adapters to Users Data Object

    PROBLEM DESCRITPION:- The following error occured while trying to attach entity adapters to Users Data Object (com.thortech.xl.dataobj.tcUSR) in Post-Update section. Error Message: The security level for this data item indicates that it cannot be upd

  • Applet plugin error on JSP page

    I currently have an applet using the swing plugin so it's embedded between <object> tags. When loading the JSP page in the editor the error "Attachment to a running virtual machine failed" appears with an OK button. When I click the OK button the ent

  • DSL Enhanced - signal levels

    Any use in asking Verizon if they can provision me faster?  DSL modem is connected directly to the Network Interface.  Downstream line attenuation is high but acceptable , but I think my noise margin is pretty good.  Will also say that my service is

  • ConnectException when using Tomcat 4.1

    Hi, I'm trying to run my web application with Tomcat 4.1 (until now I worked with Tomcat 3.2, and didn't have problems). In my application I have an applet that reads from a file (the file is located on the web server.) When I try to do it (using Url

  • Help to convert into SWF or Mp4

    I'm doing a website for a client who has an instructional video that needs to be cut into parts and saved as SWFs The dvd came as 3 files, 1 is the audio(mp3) the other is the video (Pal Version MPEG2-DVD.m2v)?????? and the other seems to be the file