Skip to main content
Participant
July 13, 2006
Question

Greenbar Paper and Database Results

  • July 13, 2006
  • 2 replies
  • 244 views
All I need to do is alternate the color of the backround from white to gray. I really have no idea how to adjust the repeat region so that it can do this, instead I end up showing double records. I know what I'm doing wrong, I just don't know what is right.

Thanks
Troy
This topic has been closed for replies.

2 replies

Inspiring
July 13, 2006
what language are you in?

I believe there is an extension to do this, but you can also do it with some
quick and easy hand coding.

Basically you can just setup a counting variable and see if it's divisible
by two, if it is, then you need to change the color to your secondary color.
If it's not, then you write your primary color.

HTH,

Jon
"TGuthrie" <webforumsuser@macromedia.com> wrote in message
news:e9683k$5v7$1@forums.macromedia.com...
> All I need to do is alternate the color of the backround from white to
> gray. I
> really have no idea how to adjust the repeat region so that it can do
> this,
> instead I end up showing double records. I know what I'm doing wrong, I
> just
> don't know what is right.
>
> Thanks
> Troy
>


Inspiring
July 13, 2006
On Thu 13 Jul 2006 03:49:08p, TGuthrie wrote in
macromedia.dreamweaver.appdev:

> All I need to do is alternate the color of the backround from white to
> gray. I really have no idea how to adjust the repeat region so that it
> can do this, instead I end up showing double records. I know what I'm
> doing wrong, I just don't know what is right.

For talking purposes, let's assume that you're using a table. Pseudocode:

<&script
ticker = -1
&>
<table>
<tr><th>headers go here</th></tr>
<!-- Repeat region starts here -->
<&script
ticker = -ticker
&>
<tr<&script if (ticker < 0) print " class='greyrow'" &>>
<td><&script print dataFromDatabase &></td></tr>
<!-- repeat region ends here -->
</table>

Substitute with your favorite serverside scripting language.