Link_to with parameters

using link_to_remote I can do the following :

<%= link_to_remote “Localisation GoogleMap”, :url => {:controller =>
‘profils’, :action => ‘locate_me’, :id => current_user}, :with =>
“‘lat=’+encodeURIComponent($F(‘latitude’))+’&lng=’+encodeURIComponent($F(‘longitude’))”,
:method => :get %>

where latitude and longitude are hidden fields in my form.

but I must use a link_to (to display the map), and I don’t know how to
rewrite that

<%= link_to “Localisation GoogleMap”, :controller => ‘profils’, :action
=> ‘locate_me’, :id => current_user, :lat => ???, , :lng => ???

thanks for your help

kad

On Apr 14, 2007, at 8:35 PM, Kad K. wrote:

<%= link_to “Localisation GoogleMap”, :controller =>
‘profils’, :action
=> ‘locate_me’, :id => current_user, :lat => ???, , :lng => ???

This a possible approach:

<%= link_to(
name,
options,
:onclick => “this.href += ‘?lat=’ + encodeURIComponent($F
(‘latitude’))”
)
%>

– fxn