I have put <cfinput> validate as a float, that took
care of that problem. But now when I validate with the regular
script, it does not return back to the error form. Did I mention
that this is flash forms..
See code below..
<cfsavecontent variable="Test">
var varExpressedAs = displayid.value;
var blnGreaterZero = (rangefloor.text
>0)&&(rangeceiling.text >0)
var blnEqualZero =
(rangefloor.text==0)&&(rangeceiling.text ==0)
<!--- THE FORM IS SET UP TO VALIDATE ON NUMBERS,
SO NO NEED TO VALIDATE WITH JS HERE --->
<!--- ATLEAST A VALUE HAD TO BE GREATER THAT ZERO --->
if (blnEqualZero)
{
alert('Enter a value in the Range or Celing form!', 'Alert',
mx.controls.Alert.OK);
}
if (blnGreaterZero)
{
alert('You can only enter one value in either the Range or
Ceiling form', 'Alert', mx.controls.Alert.OK);
}
if (varExpressedAs==1)
{
if ((rangefloor.text > 1)||(rangeceiling.text>1))
{
alert('The values entered has to be greater or eqaul to 1',
'Alert', mx.controls.Alert.OK);
}
}
if (varExpressedAs >1)
{
if ((rangefloor.text < 0)||(rangeceiling.text < 0))
{
alert('The values entered has to be percentages are not
allowed', 'Alert', mx.controls.Alert.OK);
}
}
</cfsavecontent>