Forum: Ruby on Rails hiding form when clicking outside field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adam A. (Guest)
on 2009-02-23 14:38
im guessing this is somethign to do with prototype but i want a form
which comprises of one field to disapear if the user clicks anywhere
outside of that field. Ive seen this doen on rememberthemilk.com but not
sure how its done in rails.

if anyone could point me in the right direction id appreciate it.
bill walton (Guest)
on 2009-02-24 17:42
(Received via mailing list)
Hi Adam,

On Mon, 2009-02-23 at 13:38 +0100, Adam A. wrote:
> im guessing this is somethign to do with prototype but i want a form
> which comprises of one field to disapear if the user clicks anywhere
> outside of that field. Ive seen this doen on rememberthemilk.com but not
> sure how its done in rails.
>
> if anyone could point me in the right direction id appreciate it.

You might just be able to add onBlur="$('form_name').hide()" to the text
field.

HTH,
Bill
Adam A. (Guest)
on 2009-02-25 00:13
thanks bill,

ill research into that more
This topic is locked and can not be replied to.