The links are grouped into categories such as personal hiking sites, or
weather sites, etc. When users are editing their links I want to
display the current value in the database as the currently selected
value in a pull down menu.
The pull down menu category values are in a separate table.
The specific problem I am having (and haven't been able to solve - in an
embarrassing amount of time) is that when looping over the form the
first query results values are populated into all the pull down menus.
Other fields I have which are represented as text don't have this
problem. I am at a loss to explain/figure out what to do to properly
populate the pull down menu with the current version.
Any help would be most appreciated :-)
I have included what I have below in hopes someone might be able to
point me in the right direction - again thanks!
The globallinks table has user specified data that should be editable
(recordset1).
The RecordsetGetMenu query has the categories I am trying to populate to
the pulldown menu.
<!--- The queries --->
<cfquery name="Recordset1" datasource="hike">
select *
from globallinks
where UserName = '<cfoutput>#getauthuser()#</cfoutput>'
</cfquery>
<cfquery name="RecordsetGetMenu" datasource="hike">
SELECT LinkCatergory
FROM dbo.GlobalLinkCatergory where LinkCatergory is not null
</cfquery>
<cfloop query = "recordset1">
<form method="post" name="form1"
action="">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">CatergoryHeading:</td>
<td>
<select name="CatergoryHeading">
<cfoutput query="RecordsetGetMenu">
<option value="#RecordsetGetMenu.LinkCatergory#" <cfif
(isDefined("Recordset1.CatergoryHeading") AND
RecordsetGetMenu.LinkCatergory EQ
Recordset1.CatergoryHeading)>selected</cfif>>#RecordsetGetMenu.LinkCater
gory#</option>
</cfoutput>
</select>
</td>
<tr><td>This is what the value
should be! <cfoutput>#recordset1.catergoryheading#</cfoutput> </td></tr>
<tr>
</cfloop>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

