Dear All

In my jsp page, I have a checkbox named "Select All" that will automatically select 
all the checkboxes that are loaded dynamically according to the number of records I 
have in the database. And I'm trying to do this using javascript like the following:

function CheckAll(){
 var len;
 len=document.forms[0].deleted.length;
 
 if(len==null){
  document.forms[0].deleted.checked = document.forms
  [0].chkall.checked;
 }
 else{
  for (var i=0;i<len;i++){
    document.forms[0].deleted[i].checked =  
    document.forms[0].chkall.checked;           
  }
 }
}

However, I have got difficulty implementing it coz unlike the "name" attribute for 
normal html checkbox tag, the "name" attribute in the struts html tag refers to the 
name of the bean. Anyone out there knows how to overcome this problem?

Thanks in advance. (=^_^=)


See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp
 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to