cancel
Showing results for 
Search instead for 
Did you mean: 

How can i find out what item has the focus on a form?

pierrez
Explorer
0 Kudos

I am disabling a field on a form, which works fine most of the time but occassionaly will throw an error saying that it cannot commit the action as the item is in focus.

Is there a way I can detect which item on the form has focus before I try and disable my field?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Darren,

I am not too sure whether you can find out which input element is in focus, but for your case I can suggest a workaround.

What you can do is, set the focus away from this field you are disabling, and then try disabling this field. For setting other fields in focus, you can use the requestFocus() mehtod.

Regards,

Satyajit.

Former Member
0 Kudos

Hi Darren,

Did you try disabling the field through a context attribute or are you disabling it in wdDoModifyView?

Thanks,

Rajit

Answers (0)