Applying onClick for multiple checkboxes at a time..
Posted: June 21st, 2010, 6:06 am
I have an array called myArr,which contains some effect names.I wrote the script to create checkboxes for each effect using another array.. now i want to apply onClick function for all the checkboxes.Actually my aim is .. if the user checks a checkbox of a particular effect then it is to be enabled or disabled in the project.
and here is the code...
any help plese....
thanx in advance...
and here is the code...
Code: Select all
function buildUI(thisObj)
{
var chkbox=new Array();
var pal=(thisObj instanceof Panel)?thisObj:new Window("palette","Total Effects",[100,100,500,500],{resizeable:true});
if(pal==null)
return pal;
else
{
var l=myArr.length;
for(i=0,y1=15,y2=35;i<l;i++,y1+=25,y2+=25)
{
chkbox[i]=pal.add("checkbox",[15,y1,150,y2],myArr[i]);
}
[b]// here i want to apply onClick function to all the checkboxes, i tried it but i can't get it.[/b]
}
}


thanx in advance...