Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ardjuna on Aug 29, 2008 01:10
open dhtmlx forum
dhtmlxCombo - possible bug in new Firefox 3

Dear Sir,
I have updated to the new Mozilla Firefox 3, and suddenly I have problem with my combo. To this combo an attachEvent("onChange",function) is assigned. When some item from the select menu is selected, there shows up a hidden input element. Each item in the menu has its own hidden (display:none) input element which I call to life via "document.getElementById('id1').style.display = visible" (var visible = 'block' for IE or 'table-row' for FF). Now in the xml file I use switch-case-default function from php (the xml file is saved as php). The default is that the first item in the list being set as selected="selected". If another item be chosen, then this one is set as selected="selected", and so on (I need this property being set, because when the user try to send my form without everything being filled out properly, then the form shows up again with warnings, and I need to keep all the items already filled). When using Firefox 2, after loading the page, the first item was selected (which was what I wanted). PS: Each item in the list has its own picture (specified in the xml file). Now, when I open or reload the page (in Firefox 3), there is still the first item visible, but without the picture, and also no function is being executed, because all the hidden fields are now visible. After I choose some option from the menu, everything works fine. But when I load the page, the fuction [i.e. attachEvent("onChange",function)] is not working any more. Is it a bug in Firefox 3, or is this proper behaviour? How can I resolve it?
I'll be very thankful for you reply.
Yours sincerely,
Marcel Golias.
Answer posted by Support on Aug 29, 2008 02:40
Be sure to check the order of commands in combo init, the attachEvent must be called before loadXML command ( in other case, if XML cached, it may be parsed and executed before event will be attached )