Wow! I realize that this HTML was handed to you, but please, never do
it this way. Problems which you should correct in the interests of
cleaner markup and better maintainability:
* Inline CSS. Banish the HTML 'style' attribute from your repertoire.
Do all styling with class names. That goes likewise for the styles you
call from your JavaScript code -- it's better to set this.className than
this.style.
* Inline JavaScript. HTML should contain *only* information about the
logical structure of a document. Styling belongs in a separate CSS
file, and by the same token, behavior belongs in a separate JavaScript
file. This has the added benefit of allowing you to use JavaScript like
a real programming language (which it is!), not an extension bolted onto
HTML.
* (Potential) lack of degradation. Always try to provide an alternative
for use when JavaScript is not available. In this case, that probably
means that you want to make sure some element within the table row in
question is wrapped in an <a href> tag. (In your case, that's probably
best done on the name column.)
If you have any questions about how to do any of these things, let me
know.
Note the url_for call (in this case on a nested resource)