2010-08-10 5 views
1

모달 창 내 서버의 다른 PHP 페이지의 내용이있는 iframe이 있습니다. iframe 내부에서 iframe을 사용하여 모달 상자를 닫는 방법을 이해하고 싶습니다.해당 iframe 내부에서 iframe을 닫는 방법

jQuery.fn.modalBox.close(); 

나는이 같은 iframe을 안에 넣어 경우 :

<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery.modalbox-1.0.9/js/jquery.modalbox-1.0.9-min.js"></script> 
<script type="text/javascript"> 
    //<!-- 
$(document).ready(function() { 

    $('.closeModalBox').click(function() { 
     jQuery.fn.modalBox.close(); 
    }); 

}); //--> 
</script> 
이 방법은 모달 창을 닫 문서에 따르면 http://opensource.steffenhollstein.de/templates/modalbox/

:

나는이 모달 창 플러그인을 사용하고 있습니다

iframe에 .closeModalBox 클래스가 있습니다.

<input type="submit" name="zrusPridatElearningKurz" id="zrusPridatElearningKurz" value="Storno" class="input-submit closeModalBox" /> 

답변

1

시도해보십시오 window.parent.jQuery.fn.modalBox.close(); 다른 팝업 구성 요소와 함께이 방법을 사용했지만 도움이 될 수 있습니다.

관련 문제