これはクロスブラウザ通信または同一生成元ポリシーの問題であり、ブラウザはそのような通信を許可しないことを私は知っています。
このユースケースを回避する必要があります。HTTPに親ページがあり、そこからフォームをHTTPSに送信しています。要件はページから離れないことであり、フォームはオーバーレイで開きます。
これは私の現在のJSP設定です
<form:form action="https://localhost:9002/myApp/springSecurity/login" class="login-form error-info" id="loginForm" method="post" commandName="loginForm" target="guestFrame">
<iframe width="0" frameborder="0" scrolling="no" name="guestFrame" >
サーバーからIframeに追加する応答でjava-scriptを送信しています。これは、サーバーから送信されるjava-scriptです。
<html><body>"+ "<script type=\"text/javascript\">parent.handleResponse('error',securityLoginStatus.getLoginFailedException());</script>"+ "</body></html>")
親ウィンドウでメソッドを定義しましたhandle-response
が、ブラウザで次のエラーが発生します
Permission denied to access property 'handleResponse'
試してみましparent.wwindow.handleResponse
たが、同じエラーが発生しました。Iframeから親ウィンドウと通信する方法はありますか?