Hi,

I have an input element on a form. When I open a popup form and then close it, I try to put the focus back on my input element by using the focus() method. However, that fails and it doesn't get focus.
When I press tab to get out of this input element, it takes several tries for it to get the tab event (since it wasn't focused, but how come it suddenly gets focus to respond later?)

Does anybody know how to get around that?

Thanks,
Sharon

Recommended Answers

All 2 Replies

Do you know callback in JavaScript? Using callbacks you can popup a form and after it focusing on a particular element. Callbacks are functions executed after performing a particular operation.

Make me think how do you open a new popup for your new window?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.