Alternate Row Colors Support

Alternate Row Colors

version 3

The Alternate Row Colors extension is designed to work with Macromedia Dreamweaver MX 2004. It enables the user to define alternate colors for a dynamically generated table. There is an additional version, which allows the user to define a third color, for JavaScript mouseover effects.

 

Plain dynamic tables look a bit boring. Also, they can be difficult to read for some of us. Setting suitable alternative colors can enhance the appearance.

The following instructions show the PHP versions of the extension, the extension will work in identical ways for PHP_MySQL, PHP_ADODB, ASP3 (VBScript), ASP3 (JavaScript) and ColdFusion server models. Versions for ASP.NET will not be developed, because the ASP.NET datagrid object can do the same job.

Please note that a very fine Flash tutorial for this extension has been written by DMXTutorials.com.

Overview

UI Access

The first step is to select the tr tag. This is very important.

  • Click inside the repeated row.
  • Use the tag bar, under the page window, to select the tr tag.

The extension is accessed from the Server Behavior control panel.

  • Click on the + button
  • Take your mouse to the Technocurve submenu
  • Select the basic extension

The two colors can be selected either by typing the hexadecimal color number into the text box, or using the Dreamweaver color selector. It is very important to select the correct tr tag. The tr tags are numbered in the code, from the top of the html code downwards. The first tr tag is tr[0]. The page in this example has only one dynamic table, with the first tr row being for the heading. In this example, tr[1] needs to be selected.

Requirements

Product: Dreamweaver MX 2004
Server Model: ASP JavaScript, ASP VBScript, ColdFusion (DWMX), PHP MySQL, PHP PHAkt 2, ASP JScript
Database: Access, SQL Server, MySQL

Paul Taylor

Paul TaylorBorn in 1961, I am a middle-aged amateur web developer. I did this professionally for 5 years. Before that I spent 17 years as a schoolteacher. I now work as a writer for the international Christian ministry, Answers in Genesis.

See All Postings From Paul Taylor >>

Reviews

Selecting the TR tag

June 12, 2003 by Kenny Darcy
Firstly Thank You for a great extension, just a quick question, when I select the TR tag that is going to be repeated I find when I try to apply your extension it jumps and applys the code to the table that the tr is nested in, am I doing something wrong or is this common to happen every so often.


Regards

Kenny

RE: Selecting the TR tag

June 12, 2003 by Paul Taylor

Thanks for your kind comments, Kenny.

This may be something I hadn't thought of! I don't tend to use tables in tables. I hadn't thought of people using table layouts, because I never do, I always put the data table inside a layer.

I'll have to look at this and check it thoroughly.

Meanwhile, I've found a bug myself. If you open a page in DW that has previously had the ARC extension added, it can't tell which of the three alternative extensions has been added. I know what to do about this, and will be re-working it for a version 2.1 a.s.a.p.

Paul

About the usage

June 14, 2003 by Ivan Halen

Hallo, Paul! Really a nice extension, expecially the extra feature OnMouseOver!

I saw that you recommend to choose the <tr> tag of the repeated row first of all, then apply the behavior: but even if I do so, on the extension's dialog screen I have to manually choose the <tr> which I'm applying the behavior... it becomes much difficult to select the right item of the array if I've got many tables and rows... is there a way to avoid this and working only with the "visually selected" row?

Still thanks for this extension!

Cannot use it. Why?

July 9, 2003 by tang stephen

I can not see and use the "Alternate Row Colour " server behaviour in my server behaviour?
Why?

See all 27 Reviews

You must me logged in to write a review.