Idle Banter For non SV and non bike related chat (and the odd bit of humour - but if any post isn't suitable it'll get deleted real quick).![]() |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Mega Poster
Join Date: Feb 2005
Location: Norfolk
Posts: 3,151
|
![]()
I am trying to get a fading text script into my website and although it works well, I cannot seem to change the colour - I have played around with all the settings to no avail - anyone able to help? I want it blue instead of black!
Code:
<script language="javascript"> var hcolor=255; function Fade(direction) { obj=document.getElementById("head1"); hcolor += direction; if (hcolor >= 0 && hcolor < 256) { hex=hcolor.toString(15); if (hex.length==1) hex="0" + hex; obj.style.color="#" + hex + hex + hex; window.setTimeout("Fade(" + direction + ");",1); } } </script> <body onLoad="Fade(-1);"> ![]() Cheers
__________________
'81 Honda H100A '18 Honda MSX125 (Grom) |
![]() |
![]() |
![]() |
#2 |
Guest
Posts: n/a
|
![]()
stupid question:
Say the user does not have javascript enabled? also, say they're blind? i.e. with a text reader? |
![]() |
![]() |
#3 |
Member
Mega Poster
Join Date: Feb 2005
Location: Norfolk
Posts: 3,151
|
![]()
Then it wont work
![]() The menu system works in the same way - its a risk I will take until I become a CSS expert ![]()
__________________
'81 Honda H100A '18 Honda MSX125 (Grom) |
![]() |
![]() |
![]() |
#4 |
Guest
Posts: n/a
|
![]()
You could try a javascript forum - only a guess but i'm presuming there are a few more experts over there.
http://forums.digitalpoint.com/forumdisplay.php?f=38 |
![]() |
![]() |
#5 |
Guest
Posts: n/a
|
![]()
hex=hcolor.toString(16);
if (hex.length==1) hex="0" + hex; obj.style.color="#" + hex + hex + "FF"; |
![]() |
![]() |
|
|