0
私は、Salesforceのページ上のカスタムボタンを持って、このボタンは、JSコードは親ページを更新すると、代わりに子供をリフレッシュし、Salesforceの
window.open("{!$Label.SF_Base_URL}/apex/DeletePageiFrame",300,300);
をトリガーDeletePageiFrameは、外部ウェブサイトのためのiframeを(持っている頂点ページです)と、クリック時に親ウィンドウをリフレッシュするボタンがあります。
<form>
<INPUT TYPE="button" NAME="myButton" onclick="handleOnClose();" value="press to close"/>
</form>
//the js function
function handleOnClose()
{
alert(window.parent.location); // this gives child window location instead
window.parent.location.reload(); //refreshes child not parent
// window.top.location.reload();
// all the functions bellow didnt work.
// window.opener.location.reload(true);
// window.opener.location.reload(false);
// opener.location.reload();
// opener.reload();
// window.opener.location.reload();
// document.opener.document.location.href = document.opener.document.location.href;
}
私はまた、親ウィンドウのリフレッシュを呼び出すために、ウィンドウクローズイベントでトリガしようとしたが、私は、クロム、代わりに親のリフレッシュされる子ウィンドウに問題がありました。
<script> window.onBeforeUnload=handleOnClose();</script>
私は複数の機会にJavaScriptを使って開発モードを混乱させました。私はそれを使用することをお勧めします。 –