& in link_to_remote... :with => "A=1&B=2" becomes &

in
<%= link_to_remote … :with =>
%!id=‘img_name=#{@images_to_dsp[i].to_s}&img_nr=2’!%>

becomes

parameters:id=‘img_name=myimg.jpg&img_nr=2’

i need & for multiple parameters…

On Nov 22, 2007, at 5:40 PM, Zoran K. wrote:

in
<%= link_to_remote … :with =>
%!id=‘img_name=#{@images_to_dsp[i].to_s}&img_nr=2’!%>

becomes

parameters:id=‘img_name=myimg.jpg&img_nr=2’

i need & for multiple parameters…

Are you saying that this doesn’t work for you? It is the correct
thing to see even if most browsers relax the rules and let
“parameters:id=‘img_name=myimg.jpg&img_nr=2’” work the same way.
That’s technically illegal since &img_nr… isn’t a valid character
entity.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

On 23 Nov 2007, at 14:49, Rob B. wrote:

i need & for multiple parameters…

Are you saying that this doesn’t work for you? It is the correct
thing to see even if most browsers relax the rules and let
“parameters:id=‘img_name=myimg.jpg&img_nr=2’” work the same way.
That’s technically illegal since &img_nr… isn’t a valid character
entity.

This being javascript and all, I believe what you actually need to
produce in terms of js is

parameters: {img_name: “myimg.jpg” img_nr: 2}

There are to_json helpers available to help you on your way.
Fred