Well, if you could make your external file look like this:
Code:
var fcontent=new Array();
fcontent[0]="<b>What\'s new?</b><br>New scripts added to the Scroller category!<br><br>The MoreZone has been updated. <a href='../morezone/index.htm'>Click here to visit</a>";
fcontent[1]="Dynamic Drive has been featured on Jars as a top 5% resource, and About.com as a recommended DHTML destination.";
fcontent[2]="Ok, enough with these pointless messages. You get the idea behind this script.</a>";
And be named, say - fcontent.js, then you could remove the above lines from the script (be sure to leave especially these and all the other lines in the scroller script):
Code:
begintag='<div style="font: normal 14px Arial; padding: 5px;">'; //set opening tag, such as font declarations
closetag='</div>';
and put this on your page before the scroller script:
HTML Code:
<script type="text/javascript" src="fcontent.js"></script>
That would do it. In fact, if you wanted to, and have a server side scripting language and data base available for this project, you could have your server generate the file as "fcontent.asp", or "fcontent.php", etc. and use that name as the src attribute. Both php and asp (and other server side languages) can be used to pull variables from the server's data base to construct a file with the proper syntax for the script.
Bookmarks