You are correct. Form.method won't be set until the user picks it and
submits the form. Now, you can default form.method to something so that
the second drop down will have values in it initially. By the way, this
is VERY bad:

 <cfoutput>
  <cfif  #form.method1# IS "1">
  </cfoutput>

This should be:

<cfif form.method is "1">

Notice, no cfoutput is needed. Remember, cfoutput is ONLY necessary when
you want the user to see the value of a CF variable. By itself, CF
doesn't need it. Ie, you DONT do this:

<cfset x = 1>
<cfoutput>
<cfset y = "#x#">
</cfoutput>
(well, that works, but is unnecessary)


This is fine...

<cfset x = 1>
<cfset y = x>

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Amanda Stern [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 03, 2002 2:25 PM
> To: CF-Talk
> Subject: Simple FORM Variable ERROR?????
> 
> 
> Hello,
> 
> I am trying to create a simple form that depending on
> which item is selected in one dropdown will determine
> the contents of the next dropdown field....it doesnt
> to recognize my form variable though....
> 
> here is my code:
> 
> 
>     <td width="300">
>       *Outreach Method:<br>
>        <select name="OutreachMethod1">
>            <option value="">--Select One--</option>
>            <option value="1">Telephone</option>
>            <option value="2">Home Visit</option>
>        </select> 
>     </td>
> 
>    <cfoutput>
>     <input type="hidden" 
>          name="method1" 
>          value="Form.OutreachMethod1">
>    </cfoutput> 
> 
> 
> <cfoutput>
>  <cfif  #form.method1# IS "1">
>  </cfoutput>
> 
> 
> So depending on which value from the OutreachMethod1
> drop down they choose will determine the cfif code
> that follows...but it doesnt recognize #form.method1#
> ...do I need to have 2 forms and submit the first
> part?
> 
> TIA
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to