[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Link in scroll



Here's the dilema and the code.  I am trying to get a hypertext link to 
appear n a scroling banner.  When you execute the code, the link shows 
as the text rather than the link.  Any assistance will be appreciated 
and final code submitted to JavaScript 411.  Thanx in advance, the 
code:
<!DOCTYPE HTML PUBLIC>
<HTML><HEAD>
<TITLE>Scrolling Link</TITLE>
<script language="JavaScript">
<!--
var TheLink="<A HREF='scrollex.htm' TARGET='_top'>Scroller</A>"
var LinkSize=TheLink.length
var wait=105, timer1;
var msg1="Here is the sample of a hypertext link  ";
var msg2="    In a scroll window .......";
var msg=msg1+TheLink+msg2;
function banner() {
	 if (msg.substring(0, LinkSize) == TheLink)
            {
                 msg = msg.substring (LinkSize, msg.length) +
msg.substring (0, LinkSize);
            }
         else msg = msg.substring (1, msg.length) + msg.substring 
(0,1);
// msg=msg.substring(1, msg.length) + msg.substring(0, 1);
	document.banner.text.value=msg;
	timer1=setTimeout("banner()", wait);
}

function pause() {
	clearTimeout(timer1);
	timer1=setTimeout("banner()", 3000);	
}
// -->
</script>
</HEAD>
<BODY BGCOLOR=midnightblue onLoad="banner()">
<script language="JavaScript">
<!--
document.write('<form name="banner"><input type="text" name="text" 
value="Blah, Blah, Blah " size="68" pause()><br></form>');
// -->
</script>
</BODY>
</HTML>

--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/