Queue 3 or more RJS actions

My .rjs file
page.visual_effect :BlindUp, “people”, :queue => ‘front’ #first
action
page.replace_html “people”, :partial => ‘person/person_compressed’,
:collection => @search_results , :queue => ‘end’ #second action, after
first is done
page.visual_effect :BlindDown, “people” , :queue => ‘end’ #third
action, after second is done

I want it to BlindUp, replace the div, and then BlindDown the div with
its new content. Instead it BlindsUp first and then BlindsDown/replaces
the div pretty much at the same time. I need three things to happen in
order and ‘front’ and ‘end’ only let me set the order for two things.

My reference so far has been
http://blog.railsdevelopment.com/pages/effect/queue/
It talks about using :scope with :queue. I tried changing all the
:queue in the above example to :queue => {:scope=> ‘myscope’}
hoping that this would set up my queue but that did not appear to work.

Any help is greatly appreciated.

Matthew M.
blog.mattmargolis.net

Matthew,

You can pass the replace html to beforeStart (of blinddown), this will
perform the visual effect before the effect is executed.


Abdur-Rahman A.
http://blog.railsdevelopment.com/

Abdur-Rahman A. wrote:

Matthew,

You can pass the replace html to beforeStart (of blinddown), this will
perform the visual effect before the effect is executed.

What is the syntax I would use for beforeStart?
If I do

page.visual_effect :BlindDown, “people” , :queue => ‘end’, {:beforeStart
=> page.replace_html “people”, :partial=>‘mypartial’}

then I get parse errors on the rjs file.
http://rails.techno-weenie.net/question/2006/5/3/how_to_use_ajax_callbacks_in_rjs_templates
shows using Javascript in beforeStart. Can I use the rjs methods like
replace_html too?

Thank you,
Matthew M.
blog.mattmargolis.net

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs