M
Muffinman
Hi,
I'm trying to build a script which will fade the colour of my text to
another. Now I've got here a litte problem. Whene ever I want to replace
one of the numbers in:
document.getElementById("main_txt").style.color = "rgb(0,0,0)";
by a var, something I can control, like: rgb(red, green, blue) of which
I made shure it were integers by parseInt(); I always get the error in
IE that there is an invalid value for the property. I can not figure out
what is wrong about the value. Can anyone give my somebody help me out
on this
Thanks in advance, Maarten
ps.
function change_colour(red, green, blue)
{
dest_red = 202;
dest_green = 207;
dest_blue = 222;
steps_red = (dest_red - red)/100;
steps_green = (dest_green - green)/100;
steps_blue = (dest_green - green)/100;
for(step = 1 ; step <= 100 ; step++)
{
red = parseInt(red);
grr = parseInt(5);
document.getElementById("main_txt").style.color = "rgb(grr,0,0)";
}
}
I'm trying to build a script which will fade the colour of my text to
another. Now I've got here a litte problem. Whene ever I want to replace
one of the numbers in:
document.getElementById("main_txt").style.color = "rgb(0,0,0)";
by a var, something I can control, like: rgb(red, green, blue) of which
I made shure it were integers by parseInt(); I always get the error in
IE that there is an invalid value for the property. I can not figure out
what is wrong about the value. Can anyone give my somebody help me out
on this
Thanks in advance, Maarten
ps.
function change_colour(red, green, blue)
{
dest_red = 202;
dest_green = 207;
dest_blue = 222;
steps_red = (dest_red - red)/100;
steps_green = (dest_green - green)/100;
steps_blue = (dest_green - green)/100;
for(step = 1 ; step <= 100 ; step++)
{
red = parseInt(red);
grr = parseInt(5);
document.getElementById("main_txt").style.color = "rgb(grr,0,0)";
}
}