how can i refresh select box after delete using ajax/javascript

Hi, on my page, I have two drop down boxes and a text box. The user can click on a delete menu icon and remove data from the fields. I have the delete working, but my select boxes won't refresh to reflect the data that has been removed from the table in the database. How can I use ajax to accomplish this? I've attached the pages in question below.
This is the page where the delete function is located and where I want to call my cfm page to refresh. I do have the <cfajaxproxy cfc="get_webServiceUsers" jsclassname="jsobj"/> at the top of the script tags on the page, this is just a snippet.

detail.cfm

function del()
{
	boolReturn = true;
	var cfcAsAjax = new jsobj();
	var returnVal = '';
	switch (documentPanels.visible) {
		case "rolepanel":
			alert("This operation is not available for Role Panels", 3000);
			break;
		case "operatorattribute":
			boolReturn = delDefault(subDir +  "administration/security/robot_putOperatorAttribute.cfm?<cfoutput>#Session.URLToken#</cfoutput>");
			break;
		case "operatorsettings":
			alert("This selection is not available for Operator Settings");
			break;
		case "webserviceusersettings":
			var consumerid = document.webserviceusersettingsForm.sel_ExternalID.value;
			var appname = document.webserviceusersettingsForm.Sel_APP_NAME.value;
			var cmsopid = document.webserviceusersettingsForm.SEL_CMS_USERID.value;
			cfcAsAjax.deleteWebUsers(appname, consumerid,cmsopid);


			break;
	}
	return boolReturn;
}

Below is the page where the select boxes reside 

webServiceUserSettings.cfm



<div id="webserviceusersettingsFormDiv" style="position: absolute; left: 5; top: 5; text-align: left;">
<cfform name="webserviceusersettingsForm">


		<table width="461" border="0">

		  <tr>
            <td width="101" CLASS="FieldName">

            <div align="left">External Application:</div></td>
		            <td width="350" class="FieldValue">


				     	<cfselect name="Sel_APP_NAME"
				            bind="cfc:get_webServiceUsers.getApps()"bindonload="true" />

			</td>
			</td>
          </tr>

				  <tr>
		            <td width="101" CLASS="FieldName"><div align="left">CMS Operator ID:</div></td>
		            <td width="350" class="FieldValue">


            				<cfselect name="SEL_CMS_USERID"
            				bind="cfc:get_webServiceUsers.getUserIds({Sel_APP_NAME})" />


		            </td>

				  </tr>


			<tr>
					<td class="FieldName">External Operator id:</td>
					<td class="FieldValue">

						<cfinput name="sel_ExternalID"
							bind="cfc:get_webServiceUsers.getExternalIDs({Sel_APP_NAME},{SEL_CMS_USERID})" disabled/>

			</tr>


        </table>

		<INPUT name="_ROW" type="hidden" value=0>
		<INPUT name="_COUNT" type="hidden" value=0>
		<INPUT name="insertaction" type="hidden" value="N">
		<INPUT name="_UPDATE" type="hidden">
		<INPUT name="_RECORDSET" type="hidden" value="rsWebServiceUserSettings">


</cfform>
</div>

<div style="position: absolute; left: 5; top: 5; text-align: left;">

<cfform name="webserviceusersettingsForm2">

		<table width="461" border="0">

		  <tr>
            <td width="101" CLASS="FieldName">

            <div align="left">External Application:</div></td>
		            <td width="350" class="FieldValue">
		             <cfselect name="Sel_EXT_APP_NAME"
				            bind="cfc:get_webServiceUsers.getExternalApps()"bindonload="true"/>

			</td>
			</td>
          </tr>

				  <tr>
		            <td width="101" CLASS="FieldName">
		            <div align="left">CMS Operator ID:</div></td>
		            <td width="350" class="FieldValue">


		           		 <cfselect name="SEL_OPERATOR_USERID"
            				bind="cfc:get_webServiceUsers.getOperatorIds()"bindonload="true"/>


		            </td>

				  </tr>


			<tr>
					<td class="FieldName">External Operator id:</td>
					<td class="FieldValue">
						<INPUT name="sel_ExternalID" class=upperCase size="35" maxlength="35">

			</tr>


        </table>

		<INPUT name="_ROW" type="hidden" value=0>
		<INPUT name="_COUNT" type="hidden" value=0>

		<INPUT name="_UPDATE" type="hidden">
		<INPUT name="_RECORDSET" type="hidden" value="rsWebServiceUserSettings">


</cfform>

</div>


Finally, here is my cfc page that contains the delete query

get_webServiceUsers.cfc

<cfcomponent>
 <cffunction name="deleteWebUsers" access="remote" output="no">
      
      	<cfargument name="APP_NAME" type="any" required="true">
           <cfargument name="CONSUMER_ID" type="any" required="true">
           <cfargument name="CMS_USERID" type="any" required="true">
      	
      	
      	  
      		<cfif request.isFullAdmin>
      		
      			
      		  
      			<cfquery name="data" datasource="#THIS.dsn#" username="#request.USERNAME#" password="#request.PASSWORD#">
      				DELETE FROM #request.SCHEMA#WEBSERVICE_USERS
      				WHERE APP_NAME = '#arguments.app_name#' AND
      				      CONSUMER_ID = '#arguments.consumer_id#' AND
      				      CMS_USERID = '#arguments.cms_userid#'
      			</cfquery>
      		  
      		</cfif>
      		
      	
      	<cfreturn "success">
   </cffunction>


</cfcomponent>

Open in new window

grnmachineAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
To remove all options use :
var selectbox = document.getElementsByTagName("theSelectBoxName")[0];
while(selectbox.options.length>0) selectbox.remove(0);

or BETTER if you set an ID to the selectbox

var selectbox = document.getElementById("theSelectBoxID");
while(selectbox.options.length>0) selectbox.remove(0);

Open in new window

0
grnmachineAuthor Commented:
Hi leakim971,

I don't want to remove all options. Just the record that was deleted. What happens right now is, the user selects the records in they want to delete, hit the delete button, but because the page doesn't refresh, the values still show in the select boxes. Can I somehow refresh these select boxes, or the page using an ajax call?
0
leakim971PluritechnicianCommented:
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

grnmachineAuthor Commented:
thats not going to work, i don't have access to the cold fusion server and can't install the dwrengine. Doesn't cold fusion 8 have built in ajax support? Is there any other way to do what I mentioned above?
0
grnmachineAuthor Commented:
I found the solution. Apparently cold fusion 8 still does not support refreshing a bound CFSELECT list. There is a work around located here in case anyone runs into similar problems.

http://cfsearching.blogspot.com/2010/02/coldfusion-9-yet-another-way-to-refresh.html

All it took was the following line to do the trick

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

Leakim971, I will give you 100 points for your troubles.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leakim971PluritechnicianCommented:
>Leakim971, I will give you 100 points for your troubles.

lol no worries, thanks a lot!
0
grnmachineAuthor Commented:
Hi, could you please assign leakim971 100 of the 500 points for his efforts. I messed up closing the quesitons properly. Thanks.
0
leakim971PluritechnicianCommented:
Thanks for the points!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.