Any plans to add a throbber to the combo box?

Our users are confused about the combobox. We are using this as a server DB search, so we took off the drop down arrow (since when you click that it makes no sense, we need them to type something in). We have something like this:


|_________| Add member button

So the user will type something in the box, the dhtmlx combo will find the user, then the user needs to click “Add member”. However, users are confused since they dont know to wait for a combo response, they click Add before the response is back… If there were a throbber, or an easy way to show the button only if something is selected, that would be great… (do that with events?)

Thanks,
Chris

Hi,

you may use onXLS and onXLE events. onXLS occurs before xm loading, onXLE - after options are loaded. So, you may show a button on “onXLE” event:

combo.attachEvent(“onXLE”,function(){
/your code here/
})

This seems to work great. Here is all of our code, which uses jquery. Note that you will probably have to adjust things for yourself, and get a busy.gif (mine is 16px by 16px). Note, most of our apps hide the dropdown arrow image, which is why there is a conditional offset there…

Chris

[code] //add hidden throbber
var textfield = $(‘div#’ + divId + ’ :text’);
var textfieldDiv = $(‘div#’ + divId + ’ .dhx_combo_box’);
var textfieldDropdownImage = $(‘div#’ + divId + ’ .dhx_combo_img’);

var leftOffset = textfieldDropdownImage.css(‘display’) == ‘none’ ? 0 : (-1 * textfieldDropdownImage.width());

textfieldDropdownImage.after(
“<img style='position:relative;top:2px;left:” + ((textfieldDiv.width() - 19) + leftOffset) + "px;display:none’ alt=‘busy…’ " +
“src=’…/fast/images/busy.gif’ id='fastComboThrobberId_” + divId + “’ class=‘fastComboThrobber’ />”);

//add a throbbber
theCombo.attachEvent(“onXLS”,function(){
$(’#fastComboThrobberId_’ + divId).show();

});
theCombo.attachEvent(“onXLE”,function(){

$('#fastComboThrobberId_' + divId).hide();

});
[/code]