meenakshi
02-13-2008, 06:10 PM
hi guys
i m new to this forum and also to javascript
i have a problem to which i m unable to find a solution
pls help me in this regard
i m using a code to change colours of the text and the table and using the following code for that
var color;
var bcolor;
var cdat=(new Date());
if ((rs("ddate"))<cdat)
{color="#4CC417" ; // green colour
bcolor="white" ;}
else if ((rs("ddate"))>cdat)
{color="orange"; // orange colour
bcolor="white";}
else if ((rs("ddate"))==cdat) // red colour
{color="#E41B17";
bcolor="white";}
problem is that the code is calculating < and >dates properly and showing right colours but does not show the right colour when date is equal(==)
it just shows the > colour instead
pls help
thanks
anand
i m new to this forum and also to javascript
i have a problem to which i m unable to find a solution
pls help me in this regard
i m using a code to change colours of the text and the table and using the following code for that
var color;
var bcolor;
var cdat=(new Date());
if ((rs("ddate"))<cdat)
{color="#4CC417" ; // green colour
bcolor="white" ;}
else if ((rs("ddate"))>cdat)
{color="orange"; // orange colour
bcolor="white";}
else if ((rs("ddate"))==cdat) // red colour
{color="#E41B17";
bcolor="white";}
problem is that the code is calculating < and >dates properly and showing right colours but does not show the right colour when date is equal(==)
it just shows the > colour instead
pls help
thanks
anand