put the following line of code :
int count = 0;
outside the while loop.
This has already been suggested earlier on the list by many helpful guys.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com

----- Original Message -----
From: Dan Lopez <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 9:27 PM
Subject: Re: Rowcolor...


> I followed the mod2 framework as provided in the
> example.  It still doesnt change color :(.  Provided
> is a sample of the code I have been trying
> out...Please
> point me in the right direction, I am stuck.  Thanks a
> bunch!
>
> CODE==================================================
>
> <% {Resultset Gotten here and formatted with
> taglibs}%>
>
> <%
> int count = 0;
> String bgcolor;
> if (count%2 == 0) {
> bgcolor="lightgrey";
> } else {
> bgcolor="lightblue";
> }
> count++;
> %>
>
> <tr bgcolor="<%= bgcolor %>">
>  <td width="189" height="17">
>    <div align="left"><%= a %></div>
>  <td width="189" height="17">
>    <div align="left"><%= b %></div>
>     <td width="182" height="17">
>       .
>       .
>       ....etc...
>   </tr>
>
> =====================================================
>
>
> --- "Straight, Christian" <[EMAIL PROTECTED]> wrote:
> > This works fine but shouldn't that be mod2 as
> > follows:
> >
> > int count = 0
> > String bgcolor;
> >
> > if (count%2 == 0)
> >    bgcolor="some color";
> > else
> >    bgcolor="some other color";
> >
> > count++;
> >
> >
> > Christian Straight
> > Inovant
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to