I find that it's very hard to select elements in an iframe and make some action in my parent page. Here is my codes and it does not work.
In my parent codes:
//(JS PART)
var $currentIFrame = $('#screen');
alert($currentIFrame.contents().find("#abc").type);
//(body part)
<iframe id="screen" name="screen" width="100%" height="100%" src="test.php">
</iframe>
in my iframe files:
//(body part)
<input type="text" id="abc" name="abc">
While, the result is "undefined" instead of "text".