Loading ...
Sorry, an error occurred while loading the content.

Fwd: Carousel- adding items with index

Expand Messages
  • Joe Developer
    Hi, I am having some problems getting 2.7 carousel to add items at a specific index. I want to add images to the carousel via ajax, but getting no love from :
    Message 1 of 1 , May 6, 2009
    • 0 Attachment


      Hi, I am having some problems getting 2.7 carousel to add items at a specific index.

      I want to add images to the carousel via ajax, but getting no love from :

      for( var i = 0 ; i < messages.length; i++){
                         
                          this.carousel.addItem( this.buildItem(messages.files[i] ), messages.files[i].pos );
                        
                      }
      Where messages look like this:
      {"num_files":350,"curpos":15,"length":5,"files":[{"url":"gadget_pics\/_BEN2998.jpg","pos":13},{"url"
      :"gadget_pics\/_BEN3001.jpg","pos":14},{"url":"gadget_pics\/_BEN3014.jpg","pos":15},{"url":"gadget_pics
      \/_BEN3018.jpg","pos":16},{"url":"gadget_pics\/_BEN3051.jpg","pos":17}]}

      and buildItem :
      this.buildItem = function(item){
                  var newItem =  "<img alt=\"Pictures\" class='carouselImg' src=\"" + item.url + "\" >";
                  return newItem;
              };

      using firebug:
      carousel->_itemsTable->items lists the objects but they do not display
      carousel->_itemsTable->items->size = 0 lists the objects but they do not display
      carousel->_itemsTable->items->numItems = 5

      Anything else you need, let me know.

      Best Regards,
      Joe
      --

      Every Facet, Every Department Of Your Mind Is To Be Programmed By You, And Unless You Assume Your Rightful Responsibility To Program Your Own Mind, The World Will Program It For You.


    Your message has been successfully submitted and would be delivered to recipients shortly.