PDA

View Full Version : Can I get a DIV component ?



guys2008
29 Jul 2009, 4:46 AM
Hey,

I want to mask a DIV element. Can I get it as a component in any way ?

Thanks,

sven
29 Jul 2009, 4:48 AM
You can get an El instance of that element.

Than you can simple call.


el.mask();

guys2008
29 Jul 2009, 5:23 AM
Hey,

Thanks for your prompt answer.
I have this HTMLContainer consisted of a DIV that holds HTML.
I want to mask the DIV. I can't so smtng like :


phoneHc.getElement().mask("Loading...");

because - first, I don't have any access to .mask
Second, I need to able to query and get only the DIV element - not the whole HTMLContainer...

phoneHc = new HtmlContainer(){
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
sethtml("<div id='mydiv'>blablabla....</div>");

sven
29 Jul 2009, 5:26 AM
El.fly(DomQuery.selectNode("#mydiv")).mask()

guys2008
29 Jul 2009, 5:30 AM
I'm trying to make it work this way but again - selectNode returns Element. mask() is not avaliable to elements...

sven
29 Jul 2009, 5:31 AM
Sorry, corrected the code.

guys2008
29 Jul 2009, 5:46 AM
where "El" is the Element of ... ?
Does fly can be applied on Elements ?

sven
29 Jul 2009, 5:47 AM
El is a class and fly a static method in that class.

guys2008
29 Jul 2009, 6:10 AM
Thanks a lot ! It does the job, although it does it only in IE... on the Hosted Browser It doesn't mask only the DIV element but the whole screen ...

guys2008
29 Jul 2009, 6:35 AM
And another last question concerning the Mask - Is there any limitation regarding the # of active masks on screen ? (Is it a modal layer and can show only one at a time..? )