Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by greg simmons on Jan 16, 2008 07:59
open dhtmlx forum
DhtmlxCombo shows tabs and spaces in Firefox

I put an dhtmlxcombo onto my form and am using ajax and autocomplete. In IE everything seems to work well, but in firefox the combo box text field is filled with 12 tabs. How can I use the control in firefox without getting the text box with tabs?

This is the nameless text field that has the 12 tabs.
<input type="text" class="dhx_combo_input" style="width: 529px;"/>

Thanks in advance.
Answer posted by Support on Jan 16, 2008 09:00
Can you please provide a code by which you init combo box object ?
The input created without any value initially, and can be affected only by selection any value inside combo ( or typing new one )
Answer posted by Greg Simmons on Jan 16, 2008 09:31

Here's the code you requested.

 function requestComboChanged(){
  // Updates Requestor's USERID
  document.frmAddWorkOrder.woUSERID.value = requestorCombo.getSelectedValue();
  document.frmAddWorkOrder.USERID.value = requestorCombo.getSelectedValue();
 }
 
</SCRIPT>

 

<select id="comboUSERID_ID" name="comboUSERID">
 <option value=""></option>
 <%if not isNull(rsWorkOrder("USERID").Value) then %>
 <option value="<%=rsWorkOrder("USERID").Value%>" selected><%=Server.HTMLEncode(getDBFieldValue(rsUser("FULLNAME"),""))%>
 <%end if%>
</select>

</td></tr>
</table>
       
<script language="javascript">
 var requestorCombo=dhtmlXComboFromSelect("comboUSERID_ID");
 requestorCombo.enableFilteringMode(true,"include/GetUserComboOptions.asp",true);
 requestorCombo.attachEvent("onChange",requestComboChanged);
</script>

Answer posted by Support on Jan 17, 2008 03:07
When initializing combo from select box its initial value set as

1) if there is selected option in selectbox - it used as selected in combo
2) if there is no selected option - first option of selectbox preselected


Please be sure that selected option in you case has not unnecessary whitespaces, because combo takes exact content as label ( while in HTML mode, not neceessary whitespaces not shown, they show in input box )