> document.editExemptions.SCEPTempExemptUnits.value >
> document.editExemptions.totalUnits.value
> 
> I pass in SCEPTempExemptUnits as 2 and totalUnits as 16... 
> Why would this think that 2 is greater than 16? It works 
> if I pass in SCEPTempExemptUnits as 1 or 10..  Any ideas?

By default, the values of HTML form fields are strings. You can use parseInt
or parseFloat as appropriate to cast them as numeric values for comparison
and other numeric operations.

f = document.editExemptions;
if (parseFloat(f.SCEPTempExemptUnits.value) >
(parseFloat(f.totalUnits.value)) {
        ...
}

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to