DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ColdFusion (http://www.daniweb.com/forums/forum19.html)
-   -   Problem in dropdown list display (http://www.daniweb.com/forums/thread163506.html)

susan_151615 Dec 22nd, 2008 12:14 am
Problem in dropdown list display
 
Hi am new to cold fusion.
AM deigning a page where i need to list company names in dropdown1 and when i select any company i have to list the vendors belonging to the particularcompany in dropdown2.
When i select a partcular vendori n dropdown2 ,the address of the vendors must be displayed in the given 2 textboxes

I know how to accomplish this in java script but i wnt everyhing to be done in cold fusion.Can anyone help me in doing this by giving a sample code and am using a stored procedure from server sde instead of writing the select queries

elixir Dec 23rd, 2008 3:13 am
Re: Problem in dropdown list display
 
A CFC with 3 methods that can give you the companies,vendors,address
<cfform name="detailsForm">
    <cfselect name="company" bind="cfc:myCFC.getCompanies()" bindonload="true">
        <option name="0">--Select Company--</option>
    </cfselect>
    <cfselect name="vendor" bind="cfc:myCFC.getvendor({company})">
        <option name="0">--Select Vendor--</option>
    </cfselect>
<cfinput name="address" type="text" label="Address:" bind="cfc:myCFC.getvendorAddress({vendor})">
</cfform>

If you want to do with a CFM then use it like
bind="url:logic_page.cfm?getme="companies&of=";
....
bind="url:logic_page.cfm?getme="vendor&of={company}"
...

want more detail... ask..

All the best

ws1267 Sep 14th, 2009 8:51 am
Re: Problem in dropdown list display
 
I've got a problem displaying cfselect dropdowns. I have several dropdowns, when choose one base on the selection before it, it works perfect. like country-state-city-zip.
But my problems, I need to let user able to choose from any dropdown and redraw others.
ie. Gender- school- sportType - gpa are dropdown selections. These dropdowns are populated from the same table by selecting distinct record. Just wondering if there is a way to populate the dropdowns matter user start from any dropdown first. Can I achieve it using cfselect?

Any help would be greatly appreciated.

ws1267 Sep 14th, 2009 1:05 pm
Re: Problem in dropdown list display
 
If I could turn on and off coldfusion tag "bindonload" then it would be easier.


All times are GMT -4. The time now is 1:29 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC