I ran into a similar problem that was seemed to be caused by the <iframe> not existing in the DOM before the <form>. It seemed like the target couldn't find the named iframe unless it had already been created. In the case of your sample code, moving the <iframe> out before the <form> may do the trick.
---
Eric D Nguyen
User Interface Engineer
http://instructables.com http://mindtangle.net