PDA

View Full Version : appendChild issue in IE



manugoel2003
11 Jan 2007, 4:37 AM
Hi,

I was working on a new app, and I have run into a strange problem..... I have an empty div in a "layout dialog" box, and on runtime I am appending certain elements to it...... but they are not showing up in IE..... when I add the following line in the end, it starts working..... any idea why



divObject.innerHTML += "";


Is that a bug in IE or am I doing anything wrong???

manugoel2003
12 Jan 2007, 10:05 AM
Oh I am so sorry I did not post the code...... I am posting the link as the code is quite long.....

http://www.e11online.com/config_mgr/index.php

layout.js contains the layout and master.js contains the dropdown creation code. When the interface is loaded, click on the "Save" button..... it will open up a dialog with a drop down....

now in the master.js file locate the following code


this.container.innerHTML += "";

if I comment out this line the dropdown is not displayed.... I fail to understand the connection

Secondly, locate this statement


YAHOO.ext.EventManager.on(oOption.id, 'click', XF.showForm.createCallback(XF.id, x));

this works in FF but not in IE, i.e. the showForm method is properly called on the click event of the dropdown options in FF, but not in IE.... what is wrong with it??


thanx

manugoel2003
15 Jan 2007, 9:10 AM
hmmm.... 3 days, no replies :( ..... well I changed my approach.... I am now using DomHelper to create all elements so now I dont need to add the innerHTML line..... moreover, I guess click event does not fire on "options" in a "select" menu in IE.... I had to drop one spec but now I am using the onchange event of the "select" tag..... posted here just in case anyone encounters a similar problem......