|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I included required and message validate attributes. However, it doesn't show any message when I tried to put some error and not put data.
<cfinput type="text" name="userPassword" maxlength="6" required="yes" validate="integer" message="you must enter password and only 6 numbers are allowed"> Does anyone know why? Thank |
|
#2
|
|||
|
|||
|
Hmm...not sure what you are doing wrong. When I run this code, it works:
<cfform action="temp2.cfm" method="POST"> <cfinput type="Text" name="userPassword" message="you must enter password and only 6 numbers are allowed" validate="integer" required="Yes" maxlength="6"> <input type="submit" name="submit" value="Submit"> </cfform> |
|
#3
|
|||
|
|||
|
I don't know why it did not work. I tried to put text in the field instead of integer as I put in validate attribute. However, it did not open a little window with the error message. It only showed me a grey page of error message like the one you will see when you worked with coldfusion.
In addition, I left the field blank. It did not showed a window with error message but the grey page of error message as the above. Do you know why? |
|
#4
|
|||
|
|||
|
This might seem like a stupid question, but are you using <cfform> rather than <form>?
|
|
#5
|
|||
|
|||
Yes, that is why I don't know why it doesn't works. I used cfform. DO you have any suggestion. Can I use pop up message? if I can, how can I tell it to validate what user has entered ![]() Last edited by sunbigsmile : May 18th, 2004 at 01:03 PM. |
|
#6
|
|||
|
|||
|
Quote:
I got it Create the directories /CFIDE/scripts/ under the root of your site. Copy the cfform.js script file from the directory of your ColdFusion server to the /CFIDE/scripts/ Dir of your site. Or In cfform Specify the path to cfform.js using the scriptSrc attibute. Example <cfform Action="Whatever.cfm" scriptSrc="/CFIDE/scripts/cfform.js"> ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > required and message attribute |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|