Ask a Question related to Macromedia ColdFusion, Design and Development.
-
straffenp #1
dynamic drop downs
hey everyone. i'm making a site that uses drop down menus. their content
changes depending on where the user is in the site. i have a table set up in my
database that contains the info that will be in the drop downs. can i query the
datasource and have the records from the table display in my drop down list? i
also have a field in the table with a webpage; can i use that to correspond to
the record displayed? hope this makes sense. i tried it once and got it, but it
only displays one record. thanks to anyone who can help!
straffenp Guest
-
Drop Downs and Embed tag
We created menus using DreamWeaver, when we put a embeded tag on the page the drop down menu go behind the embeded object. Is there anyway to fix... -
add drop downs to a php file
Hello everyone, this is my first time on here as i have just started using studio mx. I have had the software for quite a while but never got round... -
Streamlining Drop-Downs
I have a form with literally a hundred fields where the user has to select how they rank each item in a drop-down form 0-10. Is there a way to... -
drop downs not working.....
Hi, I have just finish this page and now I realize it works perfectly in Safari but the drop downs do not work in Explorer on a P.C. or on a Mac. ... -
Drop Downs
Does anyone know of a good tutorial for drop downs. The drop downs I created have alot of bugs which I can't figure out how to fix?... -
mpwoodward *TMM* #2
Re: dynamic drop downs
On 2005-06-20 20:26:03 -0500, "straffenp" <webforumsuser@macromedia.com> said:
This is all quite possible and very simple. Concerning the drop-down> hey everyone. i'm making a site that uses drop down menus. their
> content changes depending on where the user is in the site. i have a
> table set up in my database that contains the info that will be in the
> drop downs. can i query the datasource and have the records from the
> table display in my drop down list? i also have a field in the table
> with a webpage; can i use that to correspond to the record displayed?
> hope this makes sense. i tried it once and got it, but it only displays
> one record. thanks to anyone who can help!
you can either just loop through the query to create the options, for
example:
<select name="myDynamicSelect">
<cfoutput query="myQuery">
<option value="#id#">#value#</option>
</cfoutput>
</select>
#id# and #value# above would be the names of the database fields you
want to use for these elements.
Or you can use cfselect inside a cfform and use the query attribute:
<cfform name="myForm">
<cfselect name="mySelect" query="myQuery"
value="database_field_with_value"
display="database_field_with_display_content" />
</cfform>
Hope that helps,
Matt
--
Matt Woodward
[email]mpwoodward@gmail.com[/email]
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest



Reply With Quote

