View Full Version : Advanced Gallery script: a few questions

07-05-2007, 02:04 PM
1) Script Title: Advanced Gallery script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/agallery.htm

3) Questions:
-- Ticker speed:What are the maximum number of seconds that can be entered?
-- Can the code be changed so that the text rotates on a daily or weekly basis? If yes, could you give me hint to the coding?



07-06-2007, 06:00 AM
If you mean the delay between each content change, basically however long you want. The variable in question is this:

var tickspeed=3000 //ticker speed in miliseconds (2000=2 seconds)

A value of 300000 for example would mean 30 minutes- probably not what you want.

Since the contents are just plain DIV tags, to rotate them on a daily or weekly basis, the best solution probably would be to dynamically output them based on the desired schedule. The portion of the script you'll want to dynamically output is the following:

<div class="gallerycontent" subject="What is JavaScript?">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.

<div class="gallerycontent" subject="Java & JavaScript Differences">
Java is completely different from JavaScript- it's more powerful, more complex, and unfortunately, a lot harder to master. It belongs in the same league as C, C++, and other more complex languages.

<div class="gallerycontent" subject="What is DHTML?">
DHTML is the embodiment of a combination of technologies- JavaScript, CSS, and HTML. Through them a new level of interactivity is possible for the end user experience.

How exactly to do this really depends on what server side language your server supports and what you're trying to do. You may want to look at hiring a server side coder to do this for you, which I reckon is a simple enough task.