Wednesday, March 28, 2012

Programmatically creating OpacityBehavior

How can I programmatically create a opacitybehavior and attach it to a control and set its opacity value ?

Following doesnt seem to work in both IE and firefox? I changed the order of initialize() in my following code, it still doesnt work.

function setOpacity()

{

varp_lightgreendiv =new Sys.UI.Control($('lightgreendiv'));

var a =new Sys.UI.OpacityBehavior() ;

a.set_value(0.1) ;

p_lightgreendiv.get_behaviors().add(a) ;

p_lightgreendiv.initialize() ;

a.initialize() ;

}

Thanks

Indo.

Hi,

I've answered to this threadhere.

Thanks it works! I dont know what i am doing wrong in my example.

~Indo.

No comments:

Post a Comment