Applying onClick for multiple checkboxes at a time..

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
manohar
Posts: 15
Joined: April 23rd, 2010, 6:58 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...

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]

}
}	 
	
	   
any help plese.... :!: :?:
thanx in advance...
Attachments
My Script Output Jpeg File
My Script Output Jpeg File
MyScriptOutPut.jpg (31.49 KiB) Viewed 5994 times
Post Reply