How To Refresh Coldfusion Bind Select

bind
The above drop down list using cfselect bind to show data. We want user click the button to add some item to the dropdown list. When the user click the button the modal as below is showed :

modal

How to do when user click add, the new item has be entered before listing in drop down menu without refresh the page? Here the solution :

When ajax action submit success you just add this code :

ColdFusion.bindHandlerCache['yourElementID'].call();

For example :

  $.ajax({
    url: 'add_action.cfm',
    type: 'POST',
    data: formData,
    success: function (returndata) {
      $('#myModal').modal('hide');	
        ColdFusion.bindHandlerCache['company_id'].call();
      },
 });

That’s all.