Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to blur the text ?

843838Oct 3 2005 — edited Oct 3 2005
Hi,
I know, this is not the correct forum to post this....But, still, i am using this in my JSP page and this is also JavaScript....so, please excuse.

I have a requirement to fade in and out, the given text. First text should start from light color (say white) to dark black. After that, it should fade off (say from dark black to white)...I could do only the first part....(from white to black.)...how to do viz..??

please help! My code as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Scrolling news </TITLE>
<script language="JavaScript">
hex=255 // Initial color value.

function fadetext()
{ 
if(hex>0)
	{ //If color is not black yet
	hex-=11; // increase color darkness
	document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")";
	setTimeout("fadetext()",100); 
	}
else
hex=255 //reset hex value
}

</script>

<div id="sample" style="width:100%"><h3>Click on the Divisions on your Left hand Side</h3></div>
<!--<button onClick="fadetext()">Fade Text</button>-->

</HEAD>

<BODY onLoad="fadetext()">
<h4>Hello World</h4>
<img src="hightech.jpg">
</BODY>
</HTML>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2005
Added on Oct 3 2005
1 comment
168 views