--Original Message Text---
From: J E VanOver
Date: Tue, 7 Oct 2003 10:33:23 -0700

Did you put  VALUE="yes" on the <input name="defined" field?

Yes.

FYI, your subject heading references <cfinput, but you're not using <cfinput
at all.

Correct...that was a typo. I'm using just <input...

I highly recommend you obtain some good books about CF.  There is no
substitute for study.

Budget contraints...

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 10:23 AM
To: CF-Talk
Subject: RE: Checking <cfinput

I don't know. I used the below code but all i get return is "Not Defined"?

--Original Message Text---
From: J E VanOver
Date: Tue, 7 Oct 2003 10:09:50 -0700

Bushy,
You have to scope the variable.  Your form is "GET" so your variables will
be on the URL.  If your form was "POST" the variable would be "form.defined"

You should probably give the field a value too -- some browsers may not pass
fields without values.

<cfif NOT IsDefined("url.defined")>
  Not Defined
<cfelse>
  Defined
Run <cfquery....
</cfif>

<form action="" method="GET" name="redirect">
<input class="formfield" type="text" name="redirect" value="" size="8"
maxlength="15">
<input class="formbuttons" type="hidden" name="defined" value="yes"><input
class="formbuttons" type="submit" value="Jump" name="results">
</form>

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 9:52 AM
To: CF-Talk
Subject: Checking <cfinput

Hi,

I have a template that reloads itself. I'm also doing a <cfquery on a
database. What I want to do is when I load this template I don't want to do
the <cfquery unless once
loaded the user enters in some text in the <input box and then submits the
page which reloads itself.

Is the syntax below correct? It always returns "Not Defined" even if I input
text into the field.

<cfif NOT IsDefined("defined")>
  Not Defined
<cfelse>
  Defined
Run <cfquery....
Set defined to NIL
</cfif>

<form action="" method="GET" name="redirect">
<input class="formfield" type="text" name="redirect" value="" size="8"
maxlength="15">
<input class="formbuttons" type="hidden" name="defined" value=""><input
class="formbuttons" type="submit" value="Jump" name="results">
</form>


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to