jagdish-------Rubindasss
2008-May-20 13:03 UTC
Problem while using Effect.toggle( )................
Hi I''m new in rails...........I have a problem plz help me.... I''m using Effect.toggle in my code. But it is not working....My code is like this..... <%=link_to_function "Toggle this", onClick="Effect.toggle( ''ddiv'', ''slide'' ); return flase;"%> <div id=''ddiv'' style="display:none;"> this is test content </div> In mozilla nothing happens even i click the link but in IE it shos javascript error like: Line: 868 Char: 3 Error: ''down( )'' is null or not an object .................... .............. But the above code works fine if o replace Effect.toggle...... by Element.toggle............... I have downloaded all the latest files from script.aculo.us Plz let me know what is happening.......... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-20 13:27 UTC
Re: Problem while using Effect.toggle( )................
On 20 May 2008, at 14:03, jagdish-------Rubindasss wrote:> > Hi I''m new in rails...........I have a problem plz help me.... > > I''m using Effect.toggle in my code. But it is not working....My code > is like this..... > > <%=link_to_function "Toggle this", onClick="Effect.toggle( ''ddiv'', > ''slide'' ); return flase;"%>That should be> <%=link_to_function "Toggle this", "new Effect.toggle( ''ddiv'', > ''slide'' )"%>effects are always ran by instantiating a new instance of the effect object. On top of that some effects require that the element you''re working on have a child element. This can be as simple as an empty span. Fred> > > <div id=''ddiv'' style="display:none;"> > this is test content > </div> > > In mozilla nothing happens even i click the link but in IE it shos > javascript error like: > > Line: 868 > Char: 3 > Error: ''down( )'' is null or not an object > .................... > .............. > > But the above code works fine if o replace Effect.toggle...... by > Element.toggle............... I have downloaded all the latest files > from script.aculo.us > > Plz let me know what is happening.......... > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jagdish-------Rubindasss
2008-May-21 07:19 UTC
Re: Problem while using Effect.toggle( )................
Hi Fred thanks for your reply. But I have already done as your suggestion like <%=link_to_function "Toggle this", "new Effect.toggle( ''ddiv'', ''slide'' )"%> ................... ............... But still it doesn''t work. The same problem occurs...Plz help me to get rid of this............ ---jagdish On May 20, 6:27 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 20 May 2008, at 14:03,jagdish-------Rubindasss wrote: > > > > > Hi I''m new in rails...........I have a problem plz help me.... > > > I''m using Effect.toggle in my code. But it is not working....My code > > is like this..... > > > <%=link_to_function "Toggle this", onClick="Effect.toggle( ''ddiv'', > > ''slide'' ); return flase;"%> > > That should be > > > <%=link_to_function "Toggle this", "new Effect.toggle( ''ddiv'', > > ''slide'' )"%> > > effects are always ran by instantiating a new instance of the effect > object. On top of that some effects require that the element you''re > working on have a child element. This can be as simple as an empty span. > > Fred > > > > > <div id=''ddiv'' style="display:none;"> > > this is test content > > </div> > > > In mozilla nothing happens even i click the link but in IE it shos > > javascript error like: > > > Line: 868 > > Char: 3 > > Error: ''down( )'' is null or not an object > > .................... > > .............. > > > But the above code works fine if o replace Effect.toggle...... by > > Element.toggle............... I have downloaded all the latest files > > from script.aculo.us > > > Plz let me know what is happening..........--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-21 07:41 UTC
Re: Problem while using Effect.toggle( )................
On 21 May 2008, at 08:19, jagdish-------Rubindasss wrote:> > Hi Fred thanks for your reply. But I have already done as your > suggestion like > > <%=link_to_function "Toggle this", "new Effect.toggle( ''ddiv'', > ''slide'' )"%> > ................... > ............... > > But still it doesn''t work. The same problem occurs...Plz help me to > get rid of this............See second part of my previous suggestion. Fred> > > ---jagdish > > > On May 20, 6:27 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 20 May 2008, at 14:03,jagdish-------Rubindasss wrote: >> >> >> >>> Hi I''m new in rails...........I have a problem plz help me.... >> >>> I''m using Effect.toggle in my code. But it is not working....My code >>> is like this..... >> >>> <%=link_to_function "Toggle this", onClick="Effect.toggle( ''ddiv'', >>> ''slide'' ); return flase;"%> >> >> That should be >> >>> <%=link_to_function "Toggle this", "new Effect.toggle( ''ddiv'', >>> ''slide'' )"%> >> >> effects are always ran by instantiating a new instance of the effect >> object. On top of that some effects require that the element you''re >> working on have a child element. This can be as simple as an empty >> span. >> >> Fred >> >> >> >>> <div id=''ddiv'' style="display:none;"> >>> this is test content >>> </div> >> >>> In mozilla nothing happens even i click the link but in IE it shos >>> javascript error like: >> >>> Line: 868 >>> Char: 3 >>> Error: ''down( )'' is null or not an object >>> .................... >>> .............. >> >>> But the above code works fine if o replace Effect.toggle...... by >>> Element.toggle............... I have downloaded all the latest files >>> from script.aculo.us >> >>> Plz let me know what is happening.......... > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---