diff options
author | francis <francis> | 2008-02-22 13:15:03 +0000 |
---|---|---|
committer | francis <francis> | 2008-02-22 13:15:03 +0000 |
commit | 80469a7a4bd074fa087d6f859c3ad7752b22a9a4 (patch) | |
tree | 79d963e955c0c06541c4f7df5044ce67b7db823a | |
parent | 4e4568cff6f42e8407a9fc042e60b93fde82e302 (diff) |
Automatically redirect when you select item.
-rw-r--r-- | app/views/request/frontpage.rhtml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/views/request/frontpage.rhtml b/app/views/request/frontpage.rhtml index d41a7045e..f4e9c0fca 100644 --- a/app/views/request/frontpage.rhtml +++ b/app/views/request/frontpage.rhtml @@ -3,13 +3,18 @@ <div id="make_requests"> <h1>Make requests for information from the UK Government</h1> - <% form_tag({:action => :frontpage}, :id => 'public_body_form', :class => 'plaque' ) do %> + <% form_tag({:action => :frontpage}, :method => 'get', :id => 'public_body_form', :class => 'plaque' ) do %> <p> <label for="public_body_query">Find the public body you would like information from:</label> </p> <div> - <%= text_field_with_auto_complete 'public_body', 'query', {}, { :skip_style => true } %> + <%= text_field_with_auto_complete 'public_body', 'query', {}, { :skip_style => true, :frequency => 0.1, + :after_update_element => + "function(element,value) { + parent.window.location = '/?public_body[query]=' + element.value + }" + } %> </div> <div class="public_body_search_note"> Type to search e.g. Health, Business, Scotland |