So I have a project that\'s using ColdFusion and it has a form with a dropdown.
See example: http://jsfiddle.net/mwoods98/KXmNK/
What I need to
If you are using jQuery you can use the ajax function built into jquery to call to the CFC and return the result and populate the fields. BTW if you want to do this putting IDs on the fields will be VERY helpful.
$.ajax({
type: 'get',
url: 'pathToMy.cfc',
data: {method:'getNameAddressAndNumberFromID'
, myID : valueOfItemSelectedInDropDown
},
dataType: 'json',
async: false,
success: function(result){
$('#myNameInput').val(result.NAME);
$('#myNameInput').val(result.ADDRESS);
$('#myNameInput').val(result.NUMBER);
}
});
Assume you have a CFC named 'pathToMy.cfc' with a method of 'getNameAddressAndNumberFromID' and you have an ID on the inputs like Name:
the result of the method could return the name, address and number from a query. Returning this info as JSON will be really helpful.
This should get you on the right track, good luck.