rowover Behavior

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

Enables alternate row shading and row highlighting for table elements.

Syntax

XML
  		N/A
  	</td>
HTML <TABLE STYLE="behavior:url('rowover.htc')" ID=sID>
Scripting object.style.behavior = "url('rowover.htc')"
object.addBehavior ("rowover.htc")

Possible Values

sID String that specifies a unique identifier for the object.

Members Table

The following table lists the members exposed by the rowover object.

Attribute Property Description
ro--hover-background roHoverBackground Sets or retrieves the background color displayed when the mouse cursor hovers over a table row for the rowover behavior.
ro--hover-color roHoverColor Sets or retrieves the text color for the highlighted table row when using the rowover behavior.
ro--light-background roLightBackground Sets or retrieves the light color for alternately striped table rows when using the rowover behavior.
ro--selected-background roSelectedBackground Sets or retrieves the background color for the selected table row when using the rowover behavior.
ro--selected-color roSelectedColor Sets or retrieves the text color for the selected table row when using the rowover behavior.
ro--shade-background roShadeBackground Sets or retrieves the shade color for alternately striped table rows when using the rowover behavior.
SELECTABLE selectable Sets or retrieves whether clicking a table row selects the contents for all cells in the row when using the rowover behavior.
STRIPED striped Sets or retrieves whether alternate table rows are shaded for the rowover behavior.
Event Property Description
onerror Fires when a property is assigned an invalid value, or the property is read-only, for the rowover behavior.
onrowclick Fires when a table row is selected for the rowover behavior.
onrowout Fires when the mouse cursor exits a row for the rowover behavior.
onrowover Fires when the mouse cursor enters a row for the rowover behavior.
Method Description
reset Unselects the selected table row for the rowover behavior.

Remarks

The behavior-defined members listed in the preceding table are not accessible through script until the window. onload event fires. Waiting for this event to fire ensures that the document is completely loaded, that all behaviors have been applied to corresponding elements on the document , and, consequently, that all the behavior's properties, methods, and events are available for scripting. Attempting to use any of the behavior-defined members will result in a scripting error indicating that the object does not support that particular member.

Both Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript versions of the rowover.htc file can be downloaded from the rowover  sample page.

In addition to the members and styles previously listed, the rowover behavior supports cursor.

You must set the cellSpacing attribute of the table element equal to zero. If the attribute is not set or is greater than zero, the highlighting might be lost as you move between cells in the same row.

Example

This sample uses the JScript version of the rowover.htc file to demonstrate the implementation and adjustments of the rowover behavior.

<style>
.rowover{behavior: url(rowover_js.htc)}
</style>

<TABLE CLASS = "rowover">
<TR><TD>Some Text</TD></TR>
<TR><TD>Some Text</TD></TR>
<TR><TD>Some Text</TD></TR>
</TABLE>

Code example: https://samples.msdn.microsoft.com/workshop/samples/author/behaviors/library/rowover/rowover_js.htm

Applies To

TABLE

See Also

Introduction to DHTML Behaviors, Using DHTML Behaviors