This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Setting focus to a table row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Setting focus to a table row" Watch "Setting focus to a table row" New topic

Setting focus to a table row

Kalai Selvan
Ranch Hand

Joined: Jul 07, 2004
Posts: 79
Hi all,
How can we move focus to a particular table row/col?

I tried following thing: document.getElementById("someRow").focus(), but its not working.

Please help me out.

Thanks and Regards,
Kalai Selvan T.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
I hope by setting focus you mean changing the color of the row.
just set the color of the particular row to what you want .
i cant figure out how else you can say giving focus to the row.

Life called,so here I am.<br />Cheers<br />Niki.:-)
Kalai Selvan
Ranch Hand

Joined: Jul 07, 2004
Posts: 79
Thanks Niki for your quick reply.

But what i am looking at is not highlighting the rows. I want to move the focus to a particular row, so that subsequent key press events will be handled by the row.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385

you would have to give ids to the rows so you know how to locate them.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Setting focus to a table row
It's not a secret anymore!