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