Remote_function's JS output will not execute


this is weird. I’m calling this line and firebug is complaining about:
‘invalid assignment left-hand side’

      <%= javascript_tag(remote_function(:url

=>‘get’,:loading=>update_page { |page| spinnerdiv
},:complete=>update_page { |page| page.hide spinnerdiv }) ) -%>

This is the generated javascript:

What am I doing wrong?


On 5 Sep 2008, at 15:46, Maarten P. wrote:



=>‘get’,:loading=>update_page { |page| spinnerdiv
},:complete=>update_page { |page| page.hide spinnerdiv }) ) -%>

your :with option is wrong - it needs to be a javascript fragment,
eg :with => “‘resulttarget=sidebar_templateresult’”
Note the extra quote marks.


Thanks Frederick !
I just figured it out myself :slight_smile: … Anyway, I hope this also helps other

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