Skip to content
Loading
  
  •                                     class="modal-footer">  
  •                                         "button" class="btn btn-default" data-dismiss="modal">Close  
  •                                       
  •                                   
  •                                   
  •                               
  •                               
  •                           
  •                          
  •   
  •       
  •  
  •  
    +2
  • +2
    @sachin singh, @Salman bag
     
    Initially we are going to have iframe in that we need to show word document.

    When we click on the document, It needs to open in pop-up.
     
    Please guide me here. 
    +2
  • Ankit Kanojia
    +1
    Hi Sam,
     
    If you wish to open modal popup on click on iframe document then you should handled iframe click handler. Please try below code, its work for me.
     
    In iframe click event you can handle modal popup open/close events.
     
    HTML
    1. <iframe>iframe> 
    Javascript
    1. $('iframe').load(function(){  
    2.   $(this).contents().find("body").on('click', function(event) {   
    3.     alert('test');    
    4.   });  
    5. });  
    6.   
    7. $('iframe').attr("src","JavaScript:'iframe content'"); 
    Here is the jsfiddle link for your reference - http://jsfiddle.net/ankitkanojia/uhotfbw8/2/
    +1