jQuery How do I focus on contents of iframe after clearing

Posted by eknown on Stack Overflow See other posts from Stack Overflow or by eknown
Published on 2010-03-15T01:55:55Z Indexed on 2010/03/15 1:59 UTC
Read the original article Hit count: 290

Filed under:

I currently have a wysiwyg iframe where the user can submit input to another area on the page. Once the iframe input is submitted, I set it to clear the content. I want to also automatically focus back into the iframe.

This is the code I currently have:

postContentClr = $("iframe#textarea1IFrame").contents().find("body")

postContentClr.html(" ").focus();

© Stack Overflow or respective owner

Related posts about jQuery