English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using ASP and VBScript. I have a table which is styled with CSS. The code actually came from dhtmlgoodies.com. The link to the code is here: http://www.dhtmlgoodies.com/scripts/highlight-table-row/highlight-table-row.html .
When you hover over a row it changes color and also when you click on a row it changes to another color. Let's say I want to go to a details page (details.asp?itemID=1421) by clicking on that particular row?

Thanks to anyone who can help me out with this.

2007-03-22 18:24:24 · 1 answers · asked by UBigDummie 1 in Computers & Internet Programming & Design

1 answers

Hovering over a row via CSS is not supported in IE, unfortunately. CSS does not support "clicking", that is, it is not a stateful or event-driven language; just a selector/style language.


What you are describing is done using JavaScript. A simple event listener is attached to the table, that listens for mouseover, mouseout, and click events. When one of those events is fired, it bubbles up from the source element (the row clicked), and a handler function determines what to do with that information (in your example, it changes the background color of the row that originally fired the event).

You can modify the event listener to set location.href to a particular URL when a row is clicked. That would probably be the easiest solution.

2007-03-22 18:27:31 · answer #1 · answered by Rex M 6 · 0 1

fedest.com, questions and answers