0

I have an "example.jsp",

example.jsp:

 <html>
     <body>
    <iframe id="firstframe" src="abc.jsp"></iframe>
    </body>
 </html>

abc.jsp:

 <html>
 <body>
 <div id="modal" src="list.jsp"></div>
 <input type="button" id="listBtn"/>
 <script>
   $("#listBtn").click(function() {
    $("#modal").dialog({
        autoOpen: false,
        modal: true,
        width: 500,
        height: 500,
        title:'test',
    });
    $("#modalLookup").dialog("open");
});

 });
   </script>
 </body>
 </html>

So currently when I click on the button in the iframe the modal window is up and my abc.jsp is getting blurred. But I want my example.jsp to also get blurred.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Anjan Kumar
  • 13
  • 1
  • 10
  • Welcome to Stack Overflow. I don't think this will be possible. Since you're executing the JS from within the iFrame, it has it's own DOM. The modal is reaching the boundries of that document within the iFrame. I believe you'd you'd need the dialog to reside in the parent document. You will need to capture the click event from within the iFrame and trigger the dialog, and that will be hard to do. – Twisty Feb 17 '16 at 20:50
  • http://stackoverflow.com/questions/13439303/detect-click-event-inside-iframe – Twisty Feb 17 '16 at 20:52
  • Thanks @Twisty. we too tried many ways and did not succeed. Tried my luck to see if i get any solutions. :-) – Anjan Kumar Feb 18 '16 at 05:27

0 Answers0