Alternating Row Colors

Inserts a script that makes every odd table row one color and every even table row another color for one or more tables.

Overview

UI Access

Behaviors > Add Behavior > Alternating Row Colors

Requirements
Type: Behavior
Product: Dreamweaver 4, Dreamweaver MX, Dreamweaver 4.01, Dreamweaver MX 2004
Platform: Win XP/2000/2003/2008/7, Mac OS 8.6 or higher
Browser: IE 5, IE 5.5, IE 6, Netscape 6, Opera 5, Opera 6


Place your review about Alternating Row Colors




You must me logged in to write a review
Reviews
A way to get this to work (pls disregard previous post)
June 19, 2007 by Silvia Alioto
A way to get this to work (pls disregard previous post) Silvia Alioto Reply (19 June 2007, 19:42)

I got this to work manually coding the page as follows:

1. Give your table an ID in the properties window (e.g., mytable).

2. Edit the body tag:

<body onload="altRowColors('mytable','#FFFFCC','#e3e7e9')">

3. Edit the table tag:

<table width="80%"  border="0" cellpadding="3" cellspacing="0" onfocus="altRowColors('mytable','#FFFFCC','#e3e7e9')" id="mytable">

Substitute colors #FFFFCC and #e3e7e9 as needed.

A way to get this to work (pls disregard previous post)
June 19, 2007 by Silvia Alioto

I got this to work manually coding the page as follows:

1. Give your table an ID in the properties window (e.g., mytable).

2. Edit the body tag:

<body onload="altRowColors('mytable','#FFFFCC','#e3e7e9')">

3. Edit the table tag:

<table width="80%"  border="0" cellpadding="3" cellspacing="0" onfocus="altRowColors('finforms','#FFFFCC','#e3e7e9')" id="mytable">

Easy way to get this to work
June 19, 2007 by Silvia Alioto

I found the easiest way to automatically alternate the row colors was:

1. Give the table an ID in the Properties window (e.g., mytable) 

2. Place this code on the body tag:

<body id="mytable" onload="altRowColors('mytable','#FFFFCC','#738EB5')">

substitute the colors as needed.

The behavior was great as far as generating the code, but it needs a few refinements.

 

 

Sweet
January 3, 2007 by marcel e
after applying the behaviour, the UI will place an onFocus-event in the table tag, move this to the tag, and replace it with onLoad event.
See all 11 Reviews