Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic drop down list help 1

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
GB
Is it possible to create a drop down list (<select>) in coldfusion where the options are populated from a database dynamically using ajax when the down arrow of the select is clicked ? Any suggestions appreciated
 
The bind attrib is the simplest form. If it does not meet your needs google "coldfusion ajax" for tons of examples.
Code:
<html>
<head>
</head>
<body>
<cfform name="mycfform">
    <!--- 
        The States selector. 
        The bindonload attribute is required to fill the selector. 
    --->
    <cfselect name="state" bind="cfc:bindFcns.getstates()" bindonload="true">
        <option name="0">--state--</option>
    </cfselect>
    <cfselect name="city" bind="cfc:bindFcns.getcities({state})">
        <option name="0">--city--</option>
    </cfselect>
</cfform>
</body>
</html>

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_r-s_14.html
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top