Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ramakrishna Marri on Jun 15, 2009 07:14
open dhtmlx forum
dhtmlCombo issues in FireFox

Hi,
Combo box is working fine in IE, but not in firefox.
Issue 1) onChange, the option value is not set
Issue 2) Second combo box, does act like a normal combo box.

Again, its working in IE, but not in Firefox.

Please help
Answer posted by Alex (support) on Jun 16, 2009 01:52

Hello,

the local combo samples works in both IE and FF. Please, take a look at the combo samples in the package dhtmlxCombo/samples/

So, please  provide the sample to re-create the problem.

Answer posted by Ramakrishna Marri on Jun 16, 2009 06:31

Please find the sample with issue. temp.htm works fine in IE, but not in FF

Attachments (1)
Answer posted by Alex (support) on Jun 16, 2009 09:12

Hello, 

combo works correctly. There are the issues in your code:

- function getComboHandle isn't called for the second select,

- also select ids are equal for both selects. Ids must be unique. 

Answer posted by Ramakrishna Marri on Jun 16, 2009 09:54

Thanks for your quick reply, Alex.

If we have multiple combos, then do we need to give separate ids for each?? I tried that too, still it didnt work.

The second combo is not acting as expected. I dont understand, why getComboHandle is not called for the 2nd one.

Again, lets consider first one. Onchange(), I am not able to access the value selected in the first combo. [I mean "fromCompanySvcAccountId"].

form does not have the element for the (first) select. This issue is present only in FF and not in IE. The sample code attached earlier works perfectly in IE.

I have no clue, why its not working in FF. Please share if you more info...

Thanks alot,

Rama

Answer posted by Alex (support) on Jun 17, 2009 07:44

Hello, 

you can try to modify initDropDowns as follows

function initDropDowns() {
 var form = document.forms[0];
 if(form != null){
  var ele = form.elements;
  if(ele!=null){
  for(var i = ele.length-1;i>=0; i--){
  if(ele[i].id.indexOf("accountCombo")!=-1) /*if select elements have for example accountCombo and accountCombo1 ids*/
  z= getComboHandle(ele[i].id);  
  }
  }
  }
}

After combo initialization the selected value can be got by getActualValue() method:

function autoLookup() {

alert("selected value="+this.getActualValue())

}


Answer posted by Alex (support) on Jun 17, 2009 07:53

One more remark-

after combo is initialized, the select element is removed (it doesn't exist any more) - combo creates new containers. So, that's why the form doesn't have the element for the 1st select.