You can try this..
<%= text_field_tag 'login', @login, :class => "input-text", :value=>""
%>
fakdora wrote:
> Hi all,
>
> I'm having an issue with text_field_tag. I want to reset the value of
> the text_field when I refresh my browser, seems like a very simple
> thing, however I'm having hard time finding the answer.
>
> After I input some values, how do i reset the value to nil or empty??
>
> my code is below
> <%= text_field_tag 'login', @login, :class => "input-text",
> :onblur => "loginFieldOnBlur('login')",
> :onfocus => "loginFieldOnFocus('login')"
> %>
>
> Any help or tip will be greatly appreciated.
>
> I tried removing @login from text tag, setting @login to null or
> empty..setting params[:login] to an empty string in my session
> controller...but nothing seems to be working..
>
> Thanks in advance!
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---