:: Forum >>

Alternative fix for broken events in IE?

I believe that there is an established awareness of the problem illustrated by the code below. In this situation, if the event model for a control is to work in IE, a function returning the control must be used in an owning object's setContent method (please correct me if I'm wrong on this point).

var d = new AW.HTML.DIV;
var b1 = new AW.UI.Button();
b1.setControlText("The event model for this button works in FF and IE");
var b2 = new AW.UI.Button();
b2.setControlText("The event model for this button is broken in IE");
d.setContent("b2", function() {return b1;});
d.setContent("b1", b2);

This is fine when references to the controls in question are known when the code is written. However, the same strategy can't seem to be used for a dynamic list of controls (eg. replace b1 and b2 with var controls = new Array)? I'm not sure if its possible to construct a function which will accomodate this situation. Can anyone offer some advice?
Thursday, July 13, 2006
Apologies for bumping this, but it seems like too fundamental a problem to let slip How do other people cope with this problem?
Sunday, July 23, 2006

This topic is archived.

Back to support forum

Forum search