No . Client communication between frames in different domains is not possible due to the same origin policy .
If it were possible, you could do something like loading the bank's website into a frame that fills the entire window and poll it to see if the user has typed anything in the username and password fields.
If you want to communicate between domains, then there are two approaches. You need to make an HTTP request to reach any of them.
- Pass the information to the URL when the page loads
- For information loaded using the element
<script>, any code of the downloaded JS file from the remote domain will be launched on the page with the element <script>.
You can combine two approaches:
<script
type="text/javascript"
src="http://example.com/script.cgi?data=foo;more_data=bar">
</script>
See JSON-P .