Results 1 to 2 of 2

Thread: Translucent scroller

  1. #1
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Translucent scroller

    Translucent Scroller

    How would I make this look to an external file for the content? I would really like it to point to a perl script that will house the data in a database. Is this easly done? Any suggestions? I understand perl, but not JavaScript.

    Thank You,

    --ewish
    Last edited by eWish; 05-24-2006 at 03:32 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I'm not too good with perl, but the trick is basically to output the scroller contents dynamically:

    Code:
    var scrollercontent=new Array()
    //Define scroller contents. Extend or contract array as needed
    scrollercontent[0]='Visit our partner site <a href="http://freewarejava.com">Freewarejava.com </a>for free Java applets!'
    scrollercontent[1]='Got JavaScript? <a href="http://www.javascriptkit.com">JavaScript Kit</a> is the most comprehensive JavaScript site online.'
    scrollercontent[2]='Link to Dynamic Drive on your site. Please visit our <a href="http://www.dynamicdrive.com/link.htm">links page</a>.'
    In PHP for example, you can create a PHP that does this, then call it as an external JavaScript file proceeding the rest of the scroller script:

    Code:
    <script type="text/javascript" src="contents.php"></script>
    A helpful tutorial to read is External JavaScript and PHP.

Bookmarks

Posting Permissions

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