Zahid Majeed wrote:

>Hello folks!
>
>I want to make a page where user can select a State from the drop down box 
>and according to the state the city drop down will be refreshed or in other 
>word user will get all the cities according to the state selection and if 
>the state doesn't have any city then the city drop down would be empty.
>I am learning ColdFusion MX and at the backend I use Access 97 where i have 
>a table for State and a table for city which having a statecode field for 
>the reference.
>
>So it would be the great help for others too.
>  
>
Take a look here (http://projects.nateweiss.com/nwdc/workcode.htm)
Nate Weiss has a tag called twoselectsrelated that has been around for 
years and years now and has kept up to date over that time.  Its a 
custom tag that builds all the appropriate HTML and javascript required 
for you to be able put 2 related selects into a form.

If you're at all handy with javascript, you might want to try building 
your own javascript function to handle this though.  It just uses the 
cfwddx tag to take a grouped query of your related selects, turn it into 
a javascript array and then uses javascript to take the parent 
information from the first select and populate a second select using the 
information it finds in the javascript variable.

Hope that helps.

Regards

Stephen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Contribute 3 from House of Fusion, a Macromedia Authorized Affiliate 
and support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=53

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1400
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to