Submit the form or execute an AJAX request. On 10/4/07, erik tom <[EMAIL PROTECTED]> wrote: > > I have a drop down menu which does add remove functions from 1 drop down > to another , and aslo have up and down arrows which do the respective > movement. Now I need to find a way how to update the sort order in the > database if I move the item up/down. The application is written IN CF. > Here is my move script > function moveUpDown(to) { > var list2 = document.forms[0].requirements; > var index = list2.selectedIndex; > var total = list2.options.length-1; > if (index == -1) return false; > if (to == +1 && index == total) return false; > if (to == -1 && index == 0) return false; > var items = new Array; > var values = new Array; > for (i = total; i >= 0; i--) { > items[i] = list2.options[i].text; > values[i] = list2.options[i].value; > } > for (i = total; i >= 0; i--) { > if (index == i) { > list2.options[i + to] = new Option(items[i],values[i + to], 0, > 1); > list2.options[i] = new Option(items[i + to], values[i]); > i--; > } > else { > list2.options[i] = new Option(items[i], values[i]); > } > } > list2.focus(); > } > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290232 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4