your javascript is incorrect. document.getElementById('container')
returns a dom node (element:
https://developer.mozilla.org/en/DOM/document.getElementById). It does
not have a property called carousel (see
https://developer.mozilla.org/en/DOM/element)
However, if you want to clear out the carousel you could do this:
carousel.clear();
then load the carousel as normal.
you can change properties like numVisible with:
carousel.setProperty('numVisible', 4, true);
Please read:
http://billwscott.com/carousel/ as it contains this information.
--
Bill Scott
--- In ycarousel@yahoogroups.com, "craigdscribner"
<craig.scribner@...> wrote:
>
> I want to have some control buttons above my Carousels that can remove
> all the carousel items and replace them with new ones, change the size
> and the visibilityNum.
>
> I can see how to do all these things when I load the page initially,
> but I don't know how to reference and change them later on.
>
> For example, if I insert an HTML button on the page that says
> onclick="carousel.removeItem(0)" I get a javascript error saying what
> the heck is a carousel?
>
> I realize that the carousel I want is contained in a div called
> Container. But I still can't figure out a way to make something like
> this work:
> "document.getElementById('container').carousel.removeItem(0)". Again,
> it says thet carousel is undefined.
>
> Can you offer some guidance? thanks!
>
> PS - I accidentally posted this on the ydn-javascript forum before I
> discovered this list. Sorry about cross-posting!
>