Hi Guys,
Could someone please tell me how I can tell if my iframe is in focus? I'm writing a wysiwyg editor using the execcommand in javascript and ie and if the focus is outside of the iframe (on the main page body) then my buttons will write their output to the main page rather than the iframe. I would like javascript to tell me if my iframe is not in focus and pop up an alert asking the user to place the cursor in the iframe.
I could have a focus() command on the iframe before the buttons output but this adds the output to the front of the iframe.
Cheers
BatGrrrL
Could someone please tell me how I can tell if my iframe is in focus? I'm writing a wysiwyg editor using the execcommand in javascript and ie and if the focus is outside of the iframe (on the main page body) then my buttons will write their output to the main page rather than the iframe. I would like javascript to tell me if my iframe is not in focus and pop up an alert asking the user to place the cursor in the iframe.
I could have a focus() command on the iframe before the buttons output but this adds the output to the front of the iframe.
Cheers
BatGrrrL