Copy link to clipboard
Copied
Hi, I have a dynamic table that displays products in a database based on user defined inputs to the search form. When the results are returned in a table, there may be thousands depending on what the user typed in. I would really like a dropdown list added to the results page so the user could then narrow the reults even further. I was working through Ben Forta's tutorial here and thought it should work, however I dont know anything about ajax and wouldnt know where to begin to rework this to fit my needs. The tutorial shows you how to create a drowdown list, but with fresh queries populating them. I need them to be populated by the initial query. I hope this makes sense, and would like to know of any tutorials or code that would do this. I can post my cfm code, but it is just a standard query and dynamic table. Thanks for any help!
or if this could be done with strictly using CF, I just dont want to do away with the initial user defined search results.
Copy link to clipboard
Copied
Ok maybe I confused everyone with my initial question, because it's been several days and noone has responded. Maybe I am looking at this issues from the wrong angle. I would think it could be done with just using coldfusion, although I dont know how. Again, I have a search query and that returns results to a results.cfm page. From there I would like several dropdown lists that are populated with the results from the initial query. If a user enters GE, then the results page would display all GE products with all the information for each GE product. For example record one might be GE 60K19/dl light bulb, but with each particular light bulb it would also list the glass type, the base type, the wattage rating, the voltage rating, the filament type, and the average life in hours. There might be 500 or more GE bulbs though, so a dropdown list that is populated with the different base types for every GE bulb could be there so the user could select their particular GE bulb based on the base type they have.
I thought this might would be better accomplished using AJAX, but it might be something CF could handle just as well. I would really like some tips or suggestions on how to start this. I am still fairly new to CF and have never used AJAX at all. Any help would be greatly appreciated. Thanks!
Copy link to clipboard
Copied
To me, this does appear to be a job for AJAX. You're probably not getting responses to you question because it has a pretty complex and lengthy answer. Kind of like "how do I write a shopping cart in CF?"
AJAX is the right direction. ColdFusion can support AJAX; it may even directly support it with it's built in AJAX capabilities, but I tend to manually use prototype.js when I use AJAX because I know the nut & bolts whereas with my limited use of the CF AJAX stuff, it's more of a black box (tell it to do something and cross my fingers that it works).
AJAX is not really a ColdFusion question, I would look at prototypejs.org and/or jquery.com.
Copy link to clipboard
Copied
Hi Steve, thanks for the response. Yes I figured there was a pretty complex solution involved, however, I thought maybe the example tutorial from Ben Forta could have been reworked. The one I gave a link to in my post. He seems to be doing exactly what I would need, but the difference being hes populating theddl from a new query. Thanks for the links and I will check them out.