Forum Moderators: open
My javascripting abilities are minimal. I am in need of a script that will flash a message a few times on a web page and then disappear.
For example, the words "Your Edits Have Been Saved" flashes on and off in the color red for 5-seconds and then no longer appears.
Any idea's?
Thank you in advance.
Ron
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var singlemessages='Your edits have been saved'
var mspeed=0;
function popupWin() {
setTimeout('windowProp()',mspeed); // delay in seconds
}
function windowProp()
{
newWindow = window.open('','newWin','width=300,height=150,screenX=150,screenY=250');
newWindow.document.write('<html><head></head><body BGCOLOR="#ffaa00"><center>'+singlemessages+'</center></body></html>')
setTimeout('closeWin(newWindow)', 1000);// delay 1 seconds before closing
}
function closeWin(newWindow) {
newWindow.close();
mspeed++;
if(mspeed <3)
popupWin();
}
</SCRIPT>
</HEAD>
<BODY >
here you can create ur body....then after making changes..if one presses the below button u can c a popup..
<input type=submit value="Edit" onClick="popupWin()">
here for your amusement is....
The Blinking Red Text
<html>
<head>
<title>Blinking Text Message</title><style type="text/css">
<!--
span#blink
{
position:absolute;
top:100px;
left:200px;
font-family:arial;
font-size:24px;
color:#ff0000;
}
//-->
</style><script type="text/javascript">
<!--
function blinkit()
{
intrvl=0;
for(nTimes=0;nTimes<2;nTimes++)
{
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ffffff';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ff0000';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ffffff';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ff0000';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ffffff';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ff0000';",intrvl);
intrvl += 400;
setTimeout("document.getElementById('blink').style.color='#ffffff';",intrvl);
}
}
//-->
</script>
</head>
<body onload="blinkit();"><span id="blink">Your Edits Have Been Saved</span>
</body>
</html>
Now you see it...now you don't.
birdbrain