Justin To wrote:> Hi,
>
> <div
onclick="document.search.search_field.value='''';">....</div>
>
> <form id="search">
> ...
> <%= text_field_tag :search, params[:search],
:id=>"search_field",
> :value=>params[:search] %>
> ...
>
> Just wondering how I would clear the value for the text_field_tag,
>
> Thanks!!
if you were using a form_remote_tag you could always say :complete =>
''document.getElementById("search_field").value =
""''
<% form_remote_tag update => "id_of_div_to_update", :url => {
:action =>
:method_call}, :complete=>
''document.getElementById("search_field").value =
""'' do -%>
.....
<% end ->
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---