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;”%>
this is test content
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…
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
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 C. [email protected]
On 21 May 2008, at 08:19, jagdish-------Rubindasss wrote:
get rid of this…
See second part of my previous suggestion.
Fred