an email saying they didn�t because the body was too long.
_____
From: Ewok [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 12, 2004 6:28 PM
To: CF-Talk
Subject: RE: Bad Radio Button
Well, I actually threw a datasource in there and some real tables and there
were a ton of mistakes�
This code actually works. Just change the list of tables and it�s
displaytext list as well as the datasource on the query.
<!--- make a valid list of tables to choose from for the second field --->
<cfset goodtables = "mvp_images,sigevents_images">
<!--- make a list of displaytext for the good tables (positions must match)
--->
<cfset displaytext = "MVP Images,Signature Event Images">
<cfparam name="form.firstfield" default="0">
<cftry>
<cfset temp = ListGetAt(goodtables, form.firstfield)>
<cfset GetSecondRecs = true>
<cfcatch type="any">
<cfset getSecondRecs = False>
</cfcatch>
</cftry>
<!--- if getsecondrecs is true then get the records form the table that is
in the list at form.firstfields position--->
<!--- you could make the values of the fields the names of the tables, but I
wouldnt suggest putting your table names in plain view --->
<cfif GetSecondRecs>
<cfquery name="SecondQry" datasource="mydsn">
Select recordid, recordtext from #ListGetat(goodtables,
form.firstfield)#
</cfquery>
</cfif>
<cfoutput>
<form name="test" action="" method="post">
<select name="firstfield" size="1" >
<option value="0">--- MAKE A SELECTION ---</option>
<cfloop from="1" to="#listLen(goodtables)#" index="i">
<option value="#i#"<cfif form.firstfield is i>
selected</cfif>>#listgetat(displaytext, i)#</option>
</cfloop>
</select>
<select name="secondfield" size="1">
<option value="0">--- MAKE A SELECTION ---</option>
<cfif GetSecondRecs>
<cfloop query="SecondQry">
<option
value="#recordid#">#recordtext#</option>
</cfloop>
</cfif>
</select>
<br>
<input type="submit" name="submitit" value="submit me">
</form>
</cfoutput>
<!--- only include your action page (or next page) if the submit button was
used to submit --->
<cfif isdefined("form.submitit")>
The button was clicked so do your validation and continue on from here
</cfif>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
_____
[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=t:4"Todays Threads]
[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=i:4:178053"This
Message] [HYPERLINK
"http://www.houseoffusion.com/lists.cfm/link=s:4"Subscription] [HYPERLINK
"http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=678.598.4"Fast
Unsubscribe] [HYPERLINK "http://www.houseoffusion.com/signin/"User Settings]
[HYPERLINK
"https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&bus
iness=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick"Donation
s and Support]
_____
HYPERLINK "http://www.houseoffusion.com/banners/view.cfm?bannerid=37" \n
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

