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:
<script type="text/javascript">
502//<![CDATA[
503new Ajax.Request(''/ctemplates'', {asynchronous:true,
evalScripts:true,
method:''get'', onComplete:function(request){try {
504Element.hide("spinner_templates");
505} catch (e) { alert(''RJS error:\n\n'' + e.toString());
alert(''Element.hide(\"spinner_templates\");''); throw
e }},
onLoading:function(request){try {
506Element.show("spinner_templates");
507} catch (e) { alert(''RJS error:\n\n'' + e.toString());
alert(''Element.show(\"spinner_templates\");''); throw
e }},
parameters:resulttarget=sidebar_templateresult&templatetype=template&reslayout=sidebar})
508//]]>
509</script>
What am I doing wrong?
Greete
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On 5 Sep 2008, at 15:46, Maarten Porters wrote:> > 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 }) ) -%> > >your :with option is wrong - it needs to be a javascript fragment, eg :with => "''resulttarget=sidebar_templateresult''" Note the extra quote marks. Fred> This is the generated javascript: > > <script type="text/javascript"> > 502//<![CDATA[ > 503new Ajax.Request(''/ctemplates'', {asynchronous:true, > evalScripts:true, > method:''get'', onComplete:function(request){try { > 504Element.hide("spinner_templates"); > 505} catch (e) { alert(''RJS error:\n\n'' + e.toString()); > alert(''Element.hide(\"spinner_templates\");''); throw e }}, > onLoading:function(request){try { > 506Element.show("spinner_templates"); > 507} catch (e) { alert(''RJS error:\n\n'' + e.toString()); > alert(''Element.show(\"spinner_templates\");''); throw e }}, > parameters:resulttarget > =sidebar_templateresult&templatetype=template&reslayout=sidebar}) > 508//]]> > 509</script> > > > What am I doing wrong? > > Greete > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Frederick ! I just figured it out myself :) ... Anyway, I hope this also helps other people -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---