Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > ASP, ASP.NET and Coldfusion

ASP, ASP.NET and Coldfusion Microsoft's Web Development Language (ASP/ASP.NET) and Coldfusion discussion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-2007, 04:43 PM
swapna swapna is offline
Newbie
 
Join Date: Oct 2007
Posts: 1
Rep Power: 0
swapna is on a distinguished road
Angry <cfif isdefined is not working

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 10-27-2007, 05:04 PM
twalters84 twalters84 is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Rep Power: 3
twalters84 is on a distinguished road
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 06:16 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads