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

Re: Links in Scrolling text.



Pat McCarty wrote:
> 
> Hi, ever wondered if you could put links in your scrolling text? Well, you
> can! If you just stick the link in there, the link gets broken when
> scrolling to the other side, exposing the codes and looking nasty. So, I
> modified the script I had to accept any link. It checks the left substring
> for the link and if it finds it, moves the whole thing to the right, keeping
> the link intact. Here's the script...
> 
>  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
> <HTML>
> <HEAD>
> <SCRIPT LANGUAGE="JavaScript">
> 
> var Text  = "Hi"
> var Color ="black"
> var Size  = "+0"
> var MyLink="<A HREF=YOUR LINK HERE>YOUR LINK TEXT HERE</A>"
> var LinkSize=MyLink.length
> var Speed =350
> 
> var TimerId
> var TimerSet=false;
> 
> function startBanner (form)  {
>         TimerSet=!TimerSet
>         if (TimerSet)
>                 banner();
>         else
>                 kill();
> }
> 
> function banner() {
>         Text=rollMessage();
>         TimerId = setTimeout("banner()", Speed);
> }
> 
> function rollMessage () {
>         frame=parent.frames["messagefrm"];
>         doc=frame.document;
>         doc.write (
>                 '<BODY BGCOLOR=white>' +
>                 '<CENTER><FONT COLOR='+Color +
>                 '><FONT SIZE='+Size+'>'+Text+
>                 '</FONT SIZE></FONT COLOR></CENTER>');
>         doc.close();
>         if (Text.substring(0, LinkSize) == MyLink)
>            {
>                 Text = Text.substring (LinkSize, Text.length) + Text.substring (0, LinkSize);
>            }
>         else Text = Text.substring (1, Text.length) + Text.substring (0, 1)
>         return (Text);
> }
> 
> function init () {
>         Text = "Welcome to the TechnoHelm! Please support your freedom
> online by going to " + MyLink + "  "
>         //frame=parent.frames["frame1"];
>         frame=parent.frames["messagefrm"];
>         doc=frame.document;
>         doc.write (
>                 '<BODY BGCOLOR=white>' +
>                 '<CENTER><FONT COLOR='+Color +
>                 '><FONT SIZE='+Size+'>'+Text+'</FONT SIZE></FONT
> COLOR></CENTER>');
>         doc.close();
> }
> 
> function kill () {
>         frame=parent.frames["messagefrm"];
>         doc=frame.document;
>         clearTimeout (TimerId)
>         doc.close();
> }
> </SCRIPT>
> </HEAD>
> <BODY BGCOLOR="black" TEXT="#FFFFFF" LINK="#FFFF00" VLINK="#FF0000"
> onLoad="init(this.form);startBanner(this.form);">
> 
> To see this in action, goto
> http://www.ids.net/~pmccarty/
> 
> Hope this is useful for somebody...
> 
>                                         Pat McCarty
> 
> ************************************************************Hi Pat and All...

Well, I must say your site was really well put together. I tried your 
moving link....and it didn't work...it looked like it wanted to connect 
me...but it didn't. Has anyone else tried it? I thought the idea was 
good. 

Thanks.
Charlotte

--------------------------------------------------------------------
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/