Link to home
Start Free TrialLog in
Avatar of Member_2_7971128
Member_2_7971128

asked on

Coldfusion: Two dynamic depending drop down

Let me firs state that my cf skills are very week.  I have two dropdowns. "Publisher" and "Title". When a publisher is selected, only titles belonging to selected publisher should be in the dropdown.

I am using bind to link two dropdowns. But I keep on getting the error msg
"Error invoking CFC/Surveys/BinFcns.cfs: the selected argument passed on the method function is not type numeric."

What should I do.
The code files attached.

Many thanks.
IJ
surveyInput.cfm.txt
BinFcns.cfc.txt
SOLUTION
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_7971128
Member_2_7971128

ASKER

Thank you! That fixed that problem.

However now I have a logical error somewhere. Upon selecting a publisher from the 1st dropdown, instantly both dropdowns change to the first value in 2nd dropdown. Any ideas what is going on?
check the log files make sure you do not get any errors . The easiest way to do this is to use firebug in firefox bowser.

Do you have a link to the site so I can take a look at this
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can do this faily easily while without using ajax provided by coldfusion, The solution to this is very simple:

1. you can use jquery to achieve this result, check jquery Chained - http://www.appelsiini.net/projects/chained 

2. Fairly Safe Solution: - http://tutorial196.easycfm.com/ , http://tutorial218.easycfm.com/
I would rather wait for the Author to confirm as to is he still facing the issue or has solved it
Respectfully, why?  The selected answers contain a correction to the code and a complete and fully tested example that is customized to use their form and query structure.  The last two responses contain only links (2 of which are broken, 1 which is outdated and the other is for JS only).
I am not expecting that which answers are chosen and which are not, but respectfully want to to wait for few more days and see if owner returns and if he does, good, else if not you can go ahead and choose whatever you like and close it
I'll leave it up to the mods, but keeping a thread open is appropriate when there isn't a clear or proven solution to the problem. That's not the case here. The selected comments provide a clear explanation of what caused the errors, and include a runnable example demonstrating exactly how to solve it.