Problems with scriptaculous


#1

for some reason, i am having the hardest time with the simplest possible
use of a visual effect…

i have done this a million times, and this is first time i have had this
much trouble.

here’s what i am trying to do:

  1. set up a div with a link_to_remote that references its containing div
    [1].
  2. once some backend processing is done, the generated javascript will
    remove the div[2].

everything works fine… the action gets fired off… everything that
needs to happen happens.

except…

the div does not PUFF go away…

any help would be appreciated…

thanks!

[1]

,----
| <% dom_id = “desc_entry_#{@desc.id}” -%>
|
|

<%= @desc.desc_type %>:
| <%= text_field_tag “description[#{@desc.field_desc}]” %>
| <%=link_to_remote “remove”, :url => {:action => “remove_item”, :desc_id => @desc.id}, :complete => visual_effect(:puff, dom_id, :duration => 0.5 ) %>
|

`----

[2]

,----
|

Short Description:
|
| remove
|

`----

#2

try to:

  1. change async mode of ajax to synchronous (to asynchronous:false)

or

  1. fire visual_effect from controller (instead of js) via
    render :update do |page|
    page.visual_effect :puff,‘dom_id’
    end

tom

Sergio R. wrote:

  1. once some backend processing is done, the generated javascript will

|
| )}); return false;">remove
|
`----

Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz


#3

hmm… for some reason, neither of these work…

this is really perplexing me…


#4

okay, i found it… i am stupid…

there is a space in the div name…

i removed the space, and it works fine…

i suck…