How to access current javascript object by $(this) using remote_function :complete

Hello
I have the following:

:onchange => remote_function(:url => {:action => ‘some_action’}, :with
=> “‘id=’+this.value”, :complete => “var x = eval(’(’ +
request.responseText + ‘)’); $(this).next(’.product_price’).value =
x;” ) %>

If :onchange contains only $(this).next(’.product_price’).value =
“soma value” , it works!!
but, in remote_function :complete it not works!!!

why??

tnks all!

On Jul 20, 11:17 pm, flaubert [email protected] wrote:

but, in remote_function :complete it not works!!!
Because at the point that the complete function runs, ‘this’ is
different.

Fred