Cftext box accept only multiple on 0.25 values.
i got a problem.i have a cftext box.
<cfinput type="text" name="abc" id="abc">
it should accept 0.25 multiples means 0.25,0.50,0.75,1.00,1.25,1.50 like that.
i have got requirement like this.
15 Minutes - 0.25
30 Minutes - 0.50
45 Minutes - 0.75
60 Minutes - 1.00
75 Minutes - 1.25 and so on...
can any one help me on this
Modulus should handle it. If the mod of any number equals zero, there is no remainder so it's evenly divisible.
i am validating on submit. can you please tel me where i have to write this code means with in the </form> tag or out side the tag...i am new to coldfusion.
What I suggested is 'pseudo-code', and just part of the function that could be used for client-side validation. Without knowing things like form name/id, etc., I can't really help any more than that.
Basically, you could create a function between <script> and </script> tags which would be placed just prior to the closing </body> tag. If this is the only input that needs specialized validation, then you would make the function with just that one input in mind, so it would be a short script. Then give the cfform an onsubmit event that would check the value before submitting, and if it doesn't match what you need, "return false;" on the submit.
But this is becoming a little more complicated than I think it needs to be. I wonder if CF's built-in validation might work with modulus. I'll check around.
|All times are GMT +1. The time now is 03:47 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.