:: Forum >>

Getting CONTENT text inside function?

Hi alex... i hav a question, look my code:

var div = new AW.HTML.DIV;
div.setContent("my_weird_content_text_r0x",
function() {
// here, i want get the content, like (alert(this.getCurrentContent())
}
);
document.write(div);


Its possible to get the content text? In comment line //here, what i need to do?
tkz.
Paulo Cesar Silva Reis (PC from Brazil).
Monday, May 15, 2006
I guess if you try retrieving the value of the function from inside the function you will get endless loop.
Alex (ActiveWidgets)
Monday, May 15, 2006
Ill try to explain:

Im making a FILTER BAR for table, user can add GROUPS OF FILTERS (each group contains various filters), im using a list like:

|----------|--------|--------|
|objGroup | next | parent |
|----------|--------|--------|

When user add a group, i set the NEXT (with obj) and need to append a content in SPAN PARENT, like:

this.setNext(new OBJ...());
this.getNext().setParent(this);
this.getSpan().setContent("group_filter_"+this.getNext().getId(), function() {
//example, contentText() = "group_filter_5"
return GLOBAL_GROUPS[contentText().substring(contentText().indexOf("_")+1).getSpan()
}
);

So, the root GROUP SPAN append ALL CHILDS SPAN.

Screenshoots:
http://www.sonner.com.br/pc/activewidgets/ss/table_filter_add_cond.JPG
http://www.sonner.com.br/pc/activewidgets/ss/table_filter_added_cond.JPG

I found only this way to do.
Undertand? Sry my english again.
Paulo Cesar Silva Reis (PC from Brazil).
Monday, May 15, 2006

This topic is archived.


Back to support forum

Forum search