Hi, I am trying to change the database the dropdown comes from, but I get all
kinds of errors when I match the new settings. The new database is called
topics, it was a record_id(auto) and a areas column. I just basically want the
for to have those values in the dropdown. The action file works, actually
everything works except I am not getting the data I want.
Working Code(how do I change to get the data in the dropdown, but coming from
the other database?)
<cfquery name="GetRefences" datasource="#REQUEST.dataSource#">
SELECT topic
FROM reference
ORDER BY topic
</cfquery><html label="reference">
<h2>insert Reference</h2>
<p class="note"> </p>
<cfform action="insert_action.cfm" method="post" label="reference">
<table width="578" border="0">
<tr>
<td width="111">reference topic</td>
<td width="457"><cfselect name="topic">
<cfoutput query="GetRefences" group="topic" groupcasesensitive="no">
<option value="#topic#" label="reference_text"<cfif GetRefences.topic
eq
topic>
SELECTED</cfif>>#GetRefences.topic#</option>
</cfoutput>
</cfselect></td>
</tr>
<tr>
<td>reference text</td>
<td><cftextarea name="reference" label="reference" id="reference" rows="5"
cols="40"></cftextarea></td>
</tr>
<tr>
<td>reference link</td>
<td> <cfinput type="Text" name="reference_link" label="reference"
id="reference_link" size="50"></td>
</tr>
</fieldset>
<tr>
<td> </td>
<td><cfinput type = "submit" name="submit" class="button" value =
"submit"></td>
</tr>
<tr>
<td> </td>
</tr>
</table></cfform>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5330
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm