Communicating between an overlayed iFrame and the underlying page (LAMP)
I have a small form is to be filled in.
If the user is logged in, the form is submitted as normal. If the user is not logged in, I show an overlayer with an iframe'd page that contains a login box where he enters his credentials. If the credentials are correct I can "break out" of the frame to "return" to the main page, but how can I update this main page for example to show "you are now logged in" and to change the JS / PHP login that determines whether or not the form can be submitted normally and not be intercepted again by the overlayer prompt?
Afaik, these two separate pages are not aware of each other so I'm struggling to find a solution to this problem.
This is in a LAMP / jQuery / CodeIgniter environment.
EDIT: Could CodeIgniter's XML RP开发者_开发问答C class be useful for this?
Probably best not to use an iframe and just use ajax. Communicating out of an iframe is made notoriously difficult by design.
精彩评论