...

View Full Version : How can I make it work??



tellycruz
01-24-2006, 02:15 PM
I have this little scrip but I am missing something. I do not get any error but it does not work neither.
Please help me make it work

<script language="JavaScript">
<!-- Begin
var msg="I am flashing!";
var speed=300;
var visible=0;
function Flash() {
if (visible = 0) {
window.status=msg;
visible=1;
} else {
window.status=" ";
visible=0;:confused:
}
setTimeout('Flash()', speed);
}
// End -->
</script>

vwphillips
01-24-2006, 03:12 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
<script language="JavaScript">
<!-- Begin

var msg="I am flashing!";
var speed=300;
var visible=0;

function Flash() {
if (visible==0) { // = is assign, == is compare
visible=1;
window.status=msg;
return true; // return true is required to status message so set timeout will not be acessed
}
else {
visible=0;
window.status=" ";
return true;
}
}

function FlashSrt() {
setInterval('Flash()', speed);
}

// End -->
</script>}
</head>

<body onload="FlashSrt();">
<p>
</body>

</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum