Thanks for your answer.. true widget is not the right 'wording'...
it's a Carousel from http://miedlar.com/dev/carousel/
.. I forget the console.log() !  i am using FF Firebug... so easy to
get it

as a trick to SEE if it was the problem, I copied back the display
function, and it runs very well now....
Brian Miedlar should update his Carousel ..  it's a neat
implementation , even for non-js specialist...

only pending problem I still have to solve is susing Ajax.requests
from his event handler implementation :

            'setItemEvents': function(carousel, itemElement,
carouselItem, observer) {
                //This allows you to set events to the item like
rollovers/mouse events
                Event.observe(itemElement, 'mouseover', function()
{
                    Element.addClassName(itemElement, 'hover');
                });
                Event.observe(itemElement, 'mouseout', function()
{
                    Element.removeClassName(itemElement, 'hover');
                });
            }

I added an Ajax.request in dblclick event,...   the request is fired,
server processing but then the brwoser is not any more responding to
another event ...
if I insert the dblclick event AjaxRequest directly into my <div> ,
not using his event implementation, then it runs very well....
I'll find what happen later, but actually it's a very clear and neat
Carousel  using Prototype ......


On 13 sep, 12:34, bluezehn <[EMAIL PROTECTED]> wrote:
> You could very easily work out whether or not it's a loading issue by
> putting alert()'s or console.log()'s at the start of each file to
> check each is being loaded.
>
> Element#display is NOT in the current prototype API. Therefore it's
> been deprecated and then removed, almost certainly. You'll have to
> translate the word "widget" in the context you used it for me to be
> able to help further, apart from the suggestion that you could in a
> custom js file (after prototype.js) do this:
>
> Object.extend(Element, {
>   display: function(element, bShow) {
>     if(bShow) { Element.show(element); } else
> { Element.hide(element); }
>   }
>
> });
>
> That will add the display method to element. I haven't actually looked
> at the prototype source in detail - it always does exactly what I
> want, it's usually scriptaculous I'm extending and playing around with
> - but code similar to that listed above will work, just don't copy and
> paste that exactly, understand that it's extending prototype's Element
> object by adding the display function so that it will be available to
> your widget.
>
> On Sep 13, 10:39 am, Erwin <[EMAIL PROTECTED]> wrote:
>
> > Got it, the widget is using Prototype 1.6.0 where the display function
> > IS defined :
>
> >   display: function(element, bShow) {
> >     if(bShow) { Element.show(element); } else
> > { Element.hide(element); }
> >   },
>
> > but my Rails app is using Protoype 1.6.0.2 where this function IS NOT
> > defined, is it a bug or not  ??
>
> > On 13 sep, 11:20, Erwin <[EMAIL PROTECTED]> wrote:
>
> > > I am trying to incorporate a js widget into my Rails webapp...
>
> > > the html file widget is running fine in my browsers (FF3, Safari
> > > 3...) , the js lib loading is defined as folloing :
>
> > > <script language="javascript" type="text/javascript" src="clientscript/
> > > prototype.js"></script>
> > > <script language="javascript" type="text/javascript" src="clientscript/
> > > scriptaculous.js?load=effects"></script>
> > > <script language="javascript" type="text/javascript" src="clientscript/
> > > os.js"></script>
>
> > > I tried to run it into my Rails app  as it  (just changing the
> > > directory, and adding the dragdrop.js I need)
>
> > > <script language="javascript" type="text/javascript" src="javascripts/
> > > prototype.js"></script>
> > > <script language="javascript" type="text/javascript" src="javascripts/
> > > scriptaculous.js?load=effects"></script>
> > > <script language="javascript" type="text/javascript" src="javascripts/
> > > scriptaculous.js?load=dragdrop"></script>
> > > <script language="javascript" type="text/javascript" src="javascripts/
> > > os.js"></script>
>
> > > I got it, BUT there is one js error in the console (so a button is not
> > > displayed..)
>
> > > Error : Element.display is not a function
>
> > > which is on the line trying to display the button ,
>
> > > Element.display(this.forwardElement, this.navScrollIndex <=
> > > this.items.length - (this.setSize+1));
>
> > > I already have seen this kind of error, and I wonder if it's not
> > > linked to scriptaculous lib loading ?
>
> > > any clue ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to