How to add # anchor to ferret generated url?

I have the following action in my controller

def search
@query = params[:query] || ‘’
unless @query.blank?
@results = Residence.find_by_contents @query
end
end

In my View I have

<%= form_tag( { :action => 'search'}, :method => 'get')%> <%= submit_tag 'search' %> <%= end_form_tag %>

<% if @results -%>


<% end %>

When the user clicks “search” the generated url is eg:
http://localhost:3000/?query=10013&commit=search

How would I append a #results to this url so that the browser window
“jumps” to the result output part of the page ? I apologise if this is
not a ferret-specific question.

Thank you for your help,

Chris

Hi!

On Sat, Aug 12, 2006 at 07:30:35PM +0200, Chris L. wrote:
[…]

In my View I have

<%= form_tag( { :action => 'search'}, :method => 'get')%>

[…]

How would I append a #results to this url so that the browser window
“jumps” to the result output part of the page ? I apologise if this is
not a ferret-specific question.

try

<%= form_tag( { :action => ‘search’, :anchor => ‘results’ }, :method =>
‘get’)%>

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

try

<%= form_tag( { :action => ‘search’, :anchor => ‘results’ }, :method =>
‘get’)%>

Thank you Jens ! I should have checked the form_tag documentation.
Appreciate your help,

Chris