Focusable elements

J

jura

Is there a way to find out can an element receive focus?

I'm doing somthing like:
form[0].element.focus();

if element is for instance INPUT type="hidden" everything falls apart

Thanks
 
M

Martin Honnen

jura said:
Is there a way to find out can an element receive focus?

I'm doing somthing like:
form[0].element.focus();

if element is for instance INPUT type="hidden" everything falls apart


if (document.forms[0].elements.focus)
document.forms[0].elements.focus();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top