|
From: timmaayyb on 18 Apr 2008 17:45 I have the same problem. I have tried everything I can think of.. Bind to a hidden field with the ID of the dropdown value then use the onChange to call a javascript function that will select the item in the drop down. to no avail. seems to be a core aspect of web application development that is missing from cf8 bind cfselect and the new ajax features. any help or hacks would be appreciated.
From: timmaayyb on 18 Apr 2008 19:22 i found the answer. bind the value to a hidden field that calls a javascript function that accepts two parameters the id of the cfselect and gridValue the place this javascript function in the head of your document and you should be creating sweet edit ajax forms in no time that utilize cfselects with dropdowns populated from lookup tables <script type='text/javascript'> var hasRun = false; function selectDropDown(x,val) { if(!hasRun) { var dd = document.getElementById(x); for(var i = 0; i < dd.length; i++){ if(dd.options[i].value == val){ dd.selectedIndex = i; } } } hasRun = true; } </script> <cfinput type="hidden" name="categoryHiddenBind" value="" bind="javascript:selectDropDown('ComponentCatID', {grid.ComponentCatID})"> *Category: <cfselect query="queryName" name="CategoryID" display="CategoryName" value="CategoryID" queryPosition="below"> <option value="0">-- Select a Category -- </option> </cfselect> hope this helps i spent forever trying to figure this out. pass it on cause this seems to be lacking out of the box with cf8 and ajax features
|
Pages: 1 Prev: Query Issue... Next: ELF CLASS error after mod_jrun22.so rebuild |