I am trying to incorporate a js widget into my 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 "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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:19, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote:> I am trying to incorporate a js widget into my 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 "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Sep-13 09:55 UTC
Re: prototype & scriptaculous js lib loading error...
On Sep 13, 10:40 am, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> 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 ??Well it''s not in the prototype api docs. There''s nothing stopping you just sticking that function in though. Fred> > On 13 sep, 11:19, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > > I am trying to incorporate a js widget into my 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 "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---