Hello!

I have bumped into a problem that I have been trying to solver for
hours now, without any sign of hope.

I have a form which is loaded into a div through an ajax call. I would
like to hide the form again as soon as the focus is lost. The form
consists of inputs, textareas and selects.
I have tried .blur() both on the form and the parent div, but that
just didn't react. I can obviously bind a .blur to an input field, but
that doesn't help, since I only want to trigger my function if the
cursor is in none of the form fields.

If there was a way for me to traverse through the form fields and
check if one is focused it would be great. I googled for a possibility
to determine if an input, select or textarea is "under focus", but I
couldn't find anything useful.

Alternatively it would be great to find out what triggers .blur()
events on non form-elements (i.e. divs for forms themselves).

How can I solve determine if a form is not being "used" anymore?

Thanks
Capser

Reply via email to