Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Link in a scrolling message

    Hello Everyone

    What I am trying to do is the following.

    I have a scrolling message that is in a form and I want to have the text Lose weight... and Pomesteen Power.. as a link to other pages on the same website.

    Any help would be great and the code is below

    Thanks

    Code:
    <form name="msgtest">
    
      <input type="text" name="welcome" size="160">
      
    </form>
    <script language="Javascript">
    <!-- -->
    var ScrollMsg= "Lose weight and feel great with our Clean 9 Nutritional Cleanse and Weight Management Program only $114...."
    +"Pomesteen Power Multi-Pack only $69.90 - the perfect anti-oxidant drink...  "
    var CharacterPosition=0;
    var spacer = "...   "; 
    
    function StartScrolling() {
    
    document.msgtest.welcome.value=ScrollMsg.substring(CharacterPosition,ScrollMsg.length)+
    
    ScrollMsg.substring(0, CharacterPosition);
    CharacterPosition++;
    if(CharacterPosition > ScrollMsg.length) CharacterPosition=0;
    // Set a Timer to call StartScrolling() at an interval
    window.setTimeout("StartScrolling()",200); }
    
    StartScrolling();</script>

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,010
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    http://javascript.internet.com/text-...uee-links.html

    However, this works in IE only. Cross-browser solutions are much more difficult.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Jays1 (08-03-2008)

  • #4
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That is exactly what I was looking for.

    Thanks for your help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •