Remote_function's JS output will not execute

Hi,

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

      <%= javascript_tag(remote_function(:url

=>ctemplates_path(),:with=>‘resulttarget=sidebar_templateresult&templatetype=template&reslayout=sidebar’,:method
=>‘get’,:loading=>update_page { |page| page.show spinnerdiv
},:complete=>update_page { |page| page.hide spinnerdiv }) ) -%>

This is the generated javascript:

What am I doing wrong?

Greete

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

(),:with

'resulttarget

sidebar_templateresult
&templatetype=template&reslayout=sidebar’,:method
=>‘get’,:loading=>update_page { |page| page.show 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.

Fred

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

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