Title: Message
Hello Nash,
 
I have implemented this successfully with:
 
 
            <c:set var="checkboxAll" value=" <input type=\"checkbox\" name=\"uberCheckbox\" document.MyForm);\" tabindex=\"1\">" />
 
<displaytag-el:table.....>
 
   <displaytag-el:column property="cbData" headerStyleClass="myHeaderStyle" title="${pageScope.checkboxAll} Select" decorator="com.CheckBoxColumnDecorator" />
 
 
 
 
And a _javascript_ function in the _javascript_ file:
 
 
function allCheck(leadCheckbox, formElement)
{
  var state = leadCheckbox.checked;
  for (i=0; i<formElement.elements.length; i++)
  {
    var fElement = formElement.elements[i];
    if ("checkbox" == fElement.type)
    {
      fElement.checked = state;
    }
  }
}

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Nash M
Sent: Monday, March 01, 2004 5:57 PM
To: [EMAIL PROTECTED]
Subject: [displaytag-user] CheckBox functionality

Hello,
 
Has anyone Successfully implemented Select all checkbox functionality just like yahoo or hotmail. The desired functionality is that when u click on the table header checkbox all the corresponding checkbox will be checked. I tried to do this but with a decorator and but my _javascript_ is not able to find any html form elements in the table returned by the tag. I have seen something in the form called Display-edit. I have seen it on Matt Raible site http://raibledesigns.com/display-edit/.  And can anyone help  me whr can i find the source of this too.
 
Thanks,
Nash
 
 


Do you Yahoo!?
Get better spam protection with Yahoo! Mail

Reply via email to