PDA

View Full Version : Resolved Need help with Step Carousel Viewer



nuclei
11-02-2009, 09:27 PM
1) Script Title: Step Carousel Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem:

The script currently allows for text to be output for the image number displaying. I would also like for a hidden input tag in the html file to be updated with the image number as well, but am running into issues trying to modify the script to allow for that.

Any help is appreciated.

nuclei
11-03-2009, 12:39 AM
Ok, got it finally.

For anyone else wanting to do this I am pasting what I did below.

Added:


config.$usepic.html('<input type="hidden" name="usepic" value="' + valuearray[0] + '">')


directly after:



for (var i=0; i<config.statusvars.length; i++){
window[config.statusvars[i]]=valuearray[i] //Define variable (with user specified name) and set to one of the status values
config.$statusobjs[i].text(valuearray[i]+" ") //Populate element on page with ID="user specified name" with one of the status values


then added:



usepicclass: 'usepic',


to the stepcarousel.setup() initialization script.

then added:



config.$usepic=config.$gallery.find('.'+config.usepicclass)


after this line:



config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels


in the html file simply add:



<div class="usepic" style="magin:0px;padding:0px;"></div>


just after the ending </div> for the belt div and before the ending </div> of your main block.