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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing two text field values boolean 1

Status
Not open for further replies.

chidori

Technical User
Jun 13, 2002
7
US
Hi,

This is probably a simple question but somehow I can't get it to work.
What is the simplest way to compare two numbers from two different text boxes? I want to set up a field that asks for a range of numbers but I need to make sure the first number is always smaller than the second number.
If it isn't smaller, I want to display an error message.

Thanks
 
when you submit the form...

Code:
<CFIF firstnum LT secondnum>
 The first number is less than the second number!
<CFELSE>
 Condition not met!
</CFIF>
 
Thank you!
Ah, I totally forgot Cold fusion uses different operators, I was trying to use <CFIF &quot;X < Y&quot;> ...
I feel so silly... hahaha
thanks,
Chi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top