Link_to_remote - pass javascript variables

<%= link_to_remote “sometext”,
:url => { :action => :someaction, :x => “object.getX()”, :y =>
“object.getY()” },
:complete => “onComplete(request)” %>

problem: object.getX() passes unevaluated.
how to pass value of object.getX() and bind it to params[:x]?