Sijo Kg wrote:
> Hi Vikas
> 
> :with =>"'discount='+ escape($('discount_code').value) + '&discount2=' + 
> escape($('discount_code2').value)"
> 
> 
> 
> Sijo


Hello Sijo

Thanks, but it is not working.

For only one parameter it is working fine, but not for more than one 
parameter.
There is syntax error, but i tried it various ways, failed.

Following is my link_to_remote function

=link_to_remote "Apply", :update => "plan_discount", :url => { :action 
=> "discount_code"}, :with =>"'discount='+ 
escape($('discount_code').value) + '&tariff_plan=' + 
escape($('tariff_plan_id').value)"

HTML generated from above is

<a onclick="new Ajax.Updater('plan_discount_result', 
'/subscriptions/discount_code', {asynchronous:true, evalScripts:true, 
parameters:'discount='+ escape($('discount_code').value) + 
'&tariff_plan=' + escape($('tariff_plan_id').value) + 
'&authenticity_token=' + 
encodeURIComponent('FgSc9EashXK3rPds+Y31d0emXvwRRAQyEoWq1ksyH90=')}); 
return false;" href="#">Apply</a>



-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to