Title: Message
CSS is definitely the best way, but if that doesn't work for you, here's some _javascript_ you can put after your table that'll add an onclick event handler to the <th>
 
<script type="text/_javascript_">
<!--
    var table = document.getElementsByTagName("table")[0];
   
    /// make the full cell in the header's clickable
    var thead = table.getElementsByTagName("thead")[0];
    var headings = thead.getElementsByTagName("th");
    // add onclick event handler to the header
    for (i=0; i < headings.length; i++) {
        headings[i]. {
            var link = this.getElementsByTagName("a")[0];
            if (link != null) {
                location.href = "">            }
        }
    }   
//-->
</script>
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabrizio Giustina
Sent: Monday, February 02, 2004 1:25 PM
To: [EMAIL PROTECTED]
Subject: R: [displaytag-user] table header select area

try adding a css rule to your stylesheet
 
thead th a
{
   display:block;
}
 
 
 

 
 
Da: Donnerstag, Juergen
Inviato: dom 01/02/2004 7.51
A: [EMAIL PROTECTED]
Oggetto: [displaytag-user] table header select area

Hi all,

I'm using displaytag and its sorting feature. It all works fine, except one little thing I'd like to improve. Sorting requires to select the header text. In my case the header text is fairly short compared to the column width. I want to be able to click anywhere in the header, not just on the text, to do the sorting. Does anybody know how to do it?

thanx
Juergen


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to