Each checkbox has an onclick handler that calls the "radio" JavaScript function. This function is below:

function radio(clicked){
    var form = clicked.form;
    var checkboxes = form.elements[clicked.name];
    if (!clicked.checked || !checkboxes.length) {
        clicked.parentNode.parentNode.className="";
        return false;
    }

    for (i=0; i<checkboxes.length; i++) {
        if (checkboxes[i] != clicked) {
            checkboxes[i].checked=false;
            checkboxes[i].parentNode.parentNode.className="";
        }
    }

    // highlight the row
    clicked.parentNode.parentNode.className="over";
}

HTH,

Matt

On May 19, 2004, at 2:25 PM, Carolina Dolan wrote:

Hi Matt!

Could you tell me how you achieve the coloring of the rows depending on the checkbox? Because I've been meaning to do something like that.

Thanx!

Carolina

-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] nombre de Matt
Raible
Enviado el: Wednesday, May 19, 2004 4:49 PM
Para: [EMAIL PROTECTED]
Asunto: Re: [displaytag-user] Editable table


I put together a sample of how to do an editable table with the existing tag on my site. Check it out at http://demo.raibledesigns.com/appfuse/users-edit.jsp.

HTH,

Matt

On May 19, 2004, at 3:13 AM, [EMAIL PROTECTED] wrote:

Hello,
I've seen on this list some attempts to make displaytag tables
editable. I've
looked HTML Table from Yuriy Zubarev, but it doesn't implement sorting
and
export, and I don't really like the code to write. So, what is the
status of
those editable things with displaytag ? Is there a way to get a sample
of that
is currently done ?

Damien


------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user



------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user



------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to