I''ve been having a problem with this for a few days now. I''ve created a basic photo gallery based on the principles of Lightbox and built with prototype.js. A main photo is displayed with back/next buttons and a gallery counter below the photo. My base object I made works great, however, I decided recently that I wanted to incorporate some parameters in the constructor to turn it into a fader as well. This is where my problem comes in. My object is set up as follows: (the following are all member functions of the WHGallery object) initialize -> loads default parameter values then calls resetGallery() resetGallery -> loads the image set then calls showImage(0) showImage -> loads the photo at the given index prev -> decrements the image index and calls showImage(currentPhoto). Called on the Back button. next-> increments the image index and calls showImage(currentPhoto). Called on the Next button. When I started adding the fader, I added a timeout that calls next() to the end of showImage(). If my timeout reference exists, I''ll clear it and reset it. This is where my problem is. When the gallery is initialized and showImage() is called for the first time, after the timeout expires, it calls next() and errors when next() tries to call showImage(). It says that showImage() is not a function. I would assume it has something to do with how the function is being referenced in both instances, but I''m not entirely sure. Any help would be great! My working files are here: http://programmer.whipplehill.com/script/5_4_07/test.html http://programmer.whipplehill.com/script/5_4_07/whgallery2.js Here is the original gallery script I wrote: http://programmer.whipplehill.com/script/5_4_07/whgallery.js Thanks --Wes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---