Ajax rendering partial ( fields in form)

when rendering a piece of my form after an Ajax call, I get the error

ActionView::Template::Error (undefined local variable or method `f’
for #<#<Class:…

def change_price
new_price = …
@tax_amount = new_price * I18n.t(:standard_tax_rate)
render ‘backoffice/projects/change_price.js’


$(’#project_tax’).html( ‘<%= escape_javascript(render :partial =>
“backoffice/projects/project_tax”, :locals => {:f => f}) %>’);

and in my partial view

= f.text_field :tax_amount, :readonly => true, :precision =>
2, :delimiter => “.”, :value => @tax_amount

is there a way to do it , or should I use simple text_field tag in
the partial ?

thanks for feedback