troubleshooting Question

populate textbox

Avatar of lulu50
lulu50Flag for United States of America asked on
ColdFusion Language
10 Comments1 Solution435 ViewsLast Modified:

I want to populate my txtArea with list of states pulled from my database.

If I am using a dropdown box I would use option but for the txtarea how can I identify the value and the name of the textarea.

my code is wrong textarea shouldn't have option??

<textarea id="TxtAreaState" name="TxtAreaState" cols="20" rows="8">
<cfoutput query="DispState">
<option value="#DispState.StateID#">#DispState.StateName#</option>
<CFQUERY DATASOURCE="xx" NAME="DispState" cachedwithin="#createTimeSpan(0,0,0,-1)#">
		SELECT distinct StateTbl.StateID, StateTbl.StateName
		FROM StateTbl
		LEFT JOIN CityTbl ON CityTbl.StateID = StateTbl.StateID
		LEFT JOIN ChurchTbl ON ChurchTbl.ChCityID = CityTbl.CityID
		WHERE ChurchTbl.ChurchName <> "null" and ChurchTbl.ChurchStatus = 1
		and CityTbl.CityStatus = 1 and StateTbl.StateStatus = 1
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros