Thanks alot Matt. That is a great snippet of code. Makes it easier to
see wide data. This should be a feature of DisplayTable.
--- Matt Raible <[EMAIL PROTECTED]> wrote:
> Here's what I use:
>
> function highlightTableRows(tableId) {
> var previousClass = null;
> var table = document.getElementById(tableId);
> var tbody = table.getElementsByTagName("tbody")[0];
> if (tbody == null) {
> var rows = table.getElementsByTagName("tr");
> } else {
> var rows = tbody.getElementsByTagName("tr");
> }
> // add event handlers so rows light up and are clickable
> for (i=0; i < rows.length; i++) {
> rows[i].onmouseover = function() {
> previousClass=this.className;this.className+=' over' };
> rows[i].onmouseout = function() { this.className=previousClass
> };
> rows[i].onclick = function() {
> var cell = this.getElementsByTagName("td")[0];
> var link = cell.getElementsByTagName("a")[0];
> location.href = link.getAttribute("href");
> this.style.cursor="wait";
> }
> }
> }
>
> On Jan 5, 2005, at 11:36 AM, Matt Hughes wrote:
>
> > I want to have some javascript execute when a user mouses over a row
> > element inside the tbody. I can't seem to find it the documentation
> > if this is possible and if it is, how to do it. Could someone please
> > point me in the right direction?
> >
> >
> > -------------------------------------------------------
> > The SF.Net email is sponsored by: Beat the post-holiday blues
> > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> > _______________________________________________
> > displaytag-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user