1

I want to know how a modality mask can be created in YUI2 without using a configuration attribute. While rendering a YUI Panel, the mask normally renders before the panel is displayed. I want to do this in order to resolve a cross browser compatibility issue.

Can anyone share a snippet for this?

Alex P
  • 5,942
  • 2
  • 23
  • 30
the-petrolhead
  • 597
  • 1
  • 5
  • 16

1 Answers1

1

Just figured out a way to do this.

YUI container.js has various functions to deal with masks.

buildMask()
sizeMask()
showMask()/hideMask()

The only difference is I need to call them manually like below -

var panel = new YAHOO.widget.Panel('nodeId', configs);
...
panel.buildMask();
panel.sizeMask();
panel.bringToTop();
panel.showMask();
...
panel.render();
the-petrolhead
  • 597
  • 1
  • 5
  • 16