2012-05-01 4 views
0

아이를 갱신,이 버튼은 DeletePageiFrame는 외부 웹 사이트에 iframe이을 (이 정점 페이지입니다새로 고침 상위 페이지 내가 세일즈 포스의 페이지에서 사용자 정의 버튼이 대신 세일즈 포스

window.open("{!$Label.SF_Base_URL}/apex/DeletePageiFrame",300,300); 

JS 코드를 트리거) 및 클릭시 상위 창을 새로 고치는 것으로 간주되는 버튼을 클릭합니다.

<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> 

답변

2

내 계정에서 개발 모드가 활성화 되었기 때문에 문제가 발생했습니다. 사용하도록 설정 한 상태에서 이상한 점이 발견되면 사용을 중지하고 다시 시도하십시오. 지금은 dev 모드에 몇 가지 문제가 있습니다.

+2

나는 하나 이상의 경우에 JavaScript로 개발 모드를 엉망으로 만들었다. 나는 그것을 사용하는 것이 좋습니다. –

관련 문제