On Mon, Oct 25, 2010 at 12:21 PM, radhames brito <[email protected]> wrote:

>
>
> On Mon, Oct 25, 2010 at 12:19 PM, radhames brito <[email protected]>wrote:
>
>> try this please
>>
>> <hr>
>>> <% flash.each do |key, msg| %>
>>>   <%= content_tag :div, msg, :class => "flash", :id => key %>
>>
>>    <% content_tag :script, :type => "text/javascript" do %>
>>>     $('<%= key %>').style.display =
>>> 'none';                                    <=== this makes no sense the
>>> selector never sees anything with <% %> since this never
>>>     new Effect.Appear('<%= key %>', {duration:
>>> 3});                               gets to the browser also the content
>>> tag generates this flash_error, flash_notice, etc
>>>
>>>   <% end %>
>>>
>>>   <% content_tag :script, :type => "text/javascript" do %>
>>>     setTimeout("new Effect.Fade('<%= key %>');", 10000);            <===
>>> again try to select something with <% %>
>>>
>>>   <% end %>
>>> <% end %>
>>> </hr>
>>> <%= yield :layout %>
>>>
>>
>
> for some reason i forgot this is ERB :P so this $('<%= key %>') does makes
> sense, but still the output is not what you expect since you will be getting
> flash_error, flash_notice and such and not just error and notice which is
> the key
>

thats ok, i would b happy to see anything ;-)


>  --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to