View Full Version : Help with Translucent scroller

06-13-2006, 01:43 PM
Translucent scroller

I'm very new to javascripting within ASP.NET and haven't figured out a few things but have been looking for solutions.

I have a situation where I'm using VS2005 to work on a project that consists of a Master Page and Content Pages (Code-Behind Modal). I'm using the Dataset methods to retrieve data.

What I'm not sure about is how to populate the array within the javascript and would appreciate any help that could be suggested. I do have the scroller working, just need to be able to populate the scroller during runtime.

Also is there a way to update the array every 10 minutes or so.

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>.'

Thanks again.


06-15-2006, 07:12 AM
Populating the scroller dynamically really depends on how your pages are dynamically generated. I'm not familar with ASP.net, but the process is basically the same- generate the scroller contents portion of the JavaScript dynamically. The rest of the JavaScript basically can be left as is, something like this for a PHP page:

<script type="text/javascript">

//top part of scroller script here

var scrollercontent=new Array()
echo scroller contents...;

//rest of scroller script here