assign value to a select control from a query result
I want to assign a value to my controls from my query result.
It works for CFINPUT TEXT, but it does not work for SELECT
I would like to know are there any way tp assign my dropdown list value base on the questy result.
I have CFSTOREPROC like following:
<cfstoredproc procedure="MySP">
<cfprocparam value = "#form.IDNumber#" CFSQLTYPE = "cf_sql_integer">
<cfprocresult name="spResult" resultset="1">
</cfstoredproc>
<CFINPUT type="text" id="txtIDNumber" value="#spResult.IDNumber#" />
I am able to siign the value to a CF INPUT TEXT like above code,
<select id="lstNumber" value="#spResult.lstNumber#"></select>
but it does not assign the value from my query result for SELECT input.
Are there any way to assign a value to SELECT control from query result?
I tried to use JavaScript which works if I pass a number, but it does not work if I pass a query result,
Your help is great appreciated,
Regards,
Iccsi,
