|
||||||
| ASP, ASP.NET and Coldfusion Microsoft's Web Development Language (ASP/ASP.NET) and Coldfusion discussion |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I am using cold fusion 8 to develop forms. I need to check if user has entered a value of type "text". If not then a message has to Cfoutput. i am using the following code:
<cfif not isdefined("form.question")> <cfoutput> Enter question </cfoutput> </cfif> The problem is even f nothing is entered in the Question Field, the message Enter question is not being displayed. Its as is the <cfif not isdefined("form.question")> is not at all being recognised. I also tried <cfif not isdefined("form.question_now")> Please help. |
| Sponsored Links |
|
|
|
|||
|
Hey there,
Try this: <cfif not isdefined("form.question") OR #form.question# EQ ""> <cfoutput>Enter question</cfoutput> </cfif> Your problem is when the form is submitted the question variable is defined, but it is set to an empty string. Sincerely, Travis Walters |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Working from home | Void | Business and Legal | 11 | 08-04-2006 03:37 PM |
| String.Trim not working | dirkfirst | C# Programming | 2 | 07-24-2006 08:33 AM |
| Working with TADO Table | MrDiaz | Delphi/Python | 0 | 07-03-2006 06:28 PM |
| Line breaks not working | dirkfirst | PHP Forum | 4 | 06-16-2006 05:20 PM |
| Why this isnt working? | Creature | Java Help | 1 | 06-16-2006 07:23 AM |