2017-02-02 2 views
0

天才が私を助けてくれますか?ポップアップページのフォームを親ページに送信できるため、親ページは新しいタブなしで他のページに移動できますか?

私はjspでSpring MVC Webプロジェクトに取り組んでいます。 サブジェクトのリストを表示する親ページがあり、 、ユーザーがサブジェクトをクリックしてパスワードを確認するとポップアップページが表示されます。

popupページは、フォームによって挿入されたパスワードを親ページに転送して閉じます。そのため、親ページは内容を示す別のページに移動します。

Chromeではうまく動作しますが、Internet Exploreではうまく動作しません。 IEでは、ポップアップが消え、別のページにコンテンツが表示されます。

どのような天才が私が3ページ目を防ぐのか知っていますか?最初の親ページをコンテンツページに移動させるだけですか?

ここに私のコードです。 が

//the form in popup page 
<form action="readDetail.do" name="insertedPasswordForm" id="insertPasswordForm" role="form" method="post" target="parentPage"> 
    <input type="password" id="typedPassword" name="typedPassword"/> 
    <input type="hidden" name="privateId" value="${privateId}"/> 
</form> 

<button onclick="insertPassword()" style="margin-left:200px;">확인</button> 
//submit the form by this button with javascript 


//javascript 
function insertPassword(){ 
    opener.name = "parentPage"; 
    document.insertedPasswordForm.target = "parentPage"; 
    document.insertedPasswordForm.submit(); 
    window.close(); 
} 
+0

ブラウザコンソールにエラーがありますか? –

+0

いいえ、実際に正常に動作します。ポップアップが閉じられた後に表示される第3ページを表示したくない... –

答えて

0

....誰かが私をここに助けを願って、私はちょうど値を転送する方法を変更しました。

私はModalを使用しましたので、ポップアップを使用する必要はありませんでした。

関連する問題