Question

Am just wondering if there is a way to give focus to a non-form element. I am asking because I am using the jhtmlArea plugin (http://jhtmlarea.codeplex.com/ - page currently down) in a project. And it does work, except that since it masks an IFRAME over a TEXTAREA the IFRAME, not being a form element, doesn't seem to want to receive focus. I think the demo on the official plugin page may have shown the IFRAME getting focus on load but I can't remember for sure and can't check now due to the plugin demo page not loading.

No correct solution

OTHER TIPS

Finally got it to work in my project but for some reason when I put the solution into the jsfiddle it only works in Chrome: http://jsfiddle.net/7kTrB/8/

The following line seems to be the most relevant part:

this.iframe[0].contentWindow.focus();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top