# Div and loop help

**URL:** <https://www.ruby-forum.com/t/div-and-loop-help/139538>\
**Category:** Rails\
**Created:** [June 4, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/div-and-loop-help/139538 "2008-06-04T20:02:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankit2584](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Post date:** [June 4, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/div-and-loop-help/139538/1 "2008-06-04T20:02:53Z")

</div>

Hello,  
I want to display a effect.slidedown in a table.  
I have a table called contactnotes.

...

\<% message = contact.message %\>

\<%end%\>

| \<%= link\_to(@person.first\_name, "#", html\_options={:onclick =\> "Effect.SlideDown('show\_details\_of\_contact\_note'); return false;"})%\> |
|
| |

When i click for the slidedown link The contents of the div i.e.  
contact.message does not change as per the loop,.  
Can anyone please help me.

---

<div class="post-metadata">

**Author:** ![ankit2584](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Post date:** [June 4, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/div-and-loop-help/139538/2 "2008-06-04T23:53:45Z")

</div>

On Jun 4, 7:02 pm, Ank Ag [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello,  
> I want to display a effect.slidedown in a table.  
> I have a table called contactnotes.
> 
> should be “new Effect.SlideDown …”
> 
> > \<%end%\>  
> > It might not like the fact that you are not closing the
> 
> above,  
> and i believe it is also a requirement that a should only contain
> 
> | \<%= link\_to(@person.first\_name, "#", html\_options={:onclick =\> "Effect.SlideDown('show\_details\_of\_contact\_note'); return false;"})%\> |
> |
> | |
> | elements.
> 
> Fred
> 
> |

---

<div class="post-metadata">

**Author:** ![ankit2584](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Post date:** [June 5, 2008, 11:46am UTC](https://www.ruby-forum.com/t/div-and-loop-help/139538/3 "2008-06-05T11:46:34Z")

</div>

tml\_options={:onclick =\>

> > “Effect.SlideDown(‘show\_details\_of\_contact\_note’); return  
> > false;”})%\>
> 
> should be “new Effect.SlideDown …”
> 
> > \<%end%\>  
> > It might not like the fact that you are not closing the
> > 
> > above,  
> > and i believe it is also a requirement that a should only contain elements.
> > 
> > Fred  
> > hi,  
> > Sorry that was a typing error… I have closed the
> > 
> > tag…
