steffenk
16 Aug 2007, 11:46 PM
As i'm still a beginner in ExtJS and not quite good in JS i need a hint how to do it with iterations.
I have a div with some links inside and on click i want to open a Dialog like LayoutExample from Demo.
Atm i generate a handler for each link that seems to be not a good way:
foreach($ids as $f){
$s.= "var showBtn".$f['uid']." = Ext.get('ulink_".$f['uid']."');
// attach to click event
showBtn".$f['uid'].".on('click', this.showDialog, this);";
}
1) Is there a way to iterate all a-tags of this div and assign a clickhandler?
2) how can i determine inside showDialog which link was clicked?
would be nice if someone could enlighten me ;)
thx
I have a div with some links inside and on click i want to open a Dialog like LayoutExample from Demo.
Atm i generate a handler for each link that seems to be not a good way:
foreach($ids as $f){
$s.= "var showBtn".$f['uid']." = Ext.get('ulink_".$f['uid']."');
// attach to click event
showBtn".$f['uid'].".on('click', this.showDialog, this);";
}
1) Is there a way to iterate all a-tags of this div and assign a clickhandler?
2) how can i determine inside showDialog which link was clicked?
would be nice if someone could enlighten me ;)
thx