473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

<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:

Expand|Select|Wrap|Line Numbers
  1. <cfif not isdefined("form.question")>
  2. <cfoutput> Enter question
  3. </cfoutput>
  4.  
  5. </cfif>
  6.  
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.
Oct 27 '07 #1
2 8058
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Try using cfparam and the default attribute instead. Then you can check for the default value (which you usually set to nothing - empty string).
Oct 29 '07 #2
Can you also post your form code?

coz I think <cfif not IsDefined("Form.whatever")> is fine, the problem
may point to the form submission. Check your form method, are you actually using post instead of get; you should also check which template you submit the form to??
Dec 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Mattia | last post by:
Hi! I have a <form> that can be submitted thruogh three buttons and I need to tell witch one was pressed when the form was submitted. I now do it with 3 <input type="submit" name="..."...
5
by: Kathryn | last post by:
Good morning! I am having a problem with a span. I have items, of which I only want to show the first X characters on the screen. If the user prints the page, I want the entire item to print....
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
3
by: jl | last post by:
>From the php manual I copied and pasted this example: <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt; echo htmlentities($str); // Outputs: A 'quote' is...
2
by: rastrol7 | last post by:
I've been developing a stylesheet that takes XML from a database and parses it into a web page. The output for one field of the database consists of html code that I want passed on to the page I'm...
2
by: sf | last post by:
Hundsome Money Online Guaranteed payment month after month · Work part time or full time as you like . Make quick good cash working 2 to 3 hours a day . Work anywhere from home/ office without...
3
by: YaoBao | last post by:
In my main page, I use <cfinclude> tag to include my header and footer. But I get error. "Context validation error for the cfif tag. The start tag must have a matching end tag. An explicit end...
3
by: Chris F.A. Johnson | last post by:
On 2008-05-25, mehstg1319 wrote: .... What if my window is less than 500px high? Like many people, I find having to scroll sections of a page annoying, but you can do it with: overflow:...
6
by: Gert Kok | last post by:
When fgets() reads a string that ands with <<<EOT, the string is truncated after << and a lot of following input is discarded. When <<<EOT is changed to <<< EOT, behaviour is as I expect it. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.