Issue 284: Opening nyroModal within an iFrame
Status:  WontFix
Owner: ----
Closed:  Jul 2009
Reported by zerke2...@gmail.com, Jul 15, 2009
What steps will reproduce the problem?
1. Place nyroModal inside iFrame
2. <a href="pic_images/img4797.jpg" class="nyroModal">Image</a>
3. Click Link

What is the expected output? What do you see instead?
I would like to see the modal open outside of the iFrame to the parent
page. Instead I see the modal open up inside the iFrame. 

What version of the product are you using? On what operating system?
I am using version 1.5.0. Running Windows XP SP3

Please provide any additional information below.
The modal opens perfectly fine from the parent page and inside of the
iFrame, but I don't know of a way to specify to the modal to open outside
of the iFrame.

Jul 17, 2009
#1 anotherhero
I guess you should do a manual call instead. (Or just don't use Iframes)

Try something like the following in the iframe html.

parent.jQuery(function($){
  $('.nyroModal').click(function(e){
    e.preventDefault();
      $.nyroModalManual({ url: $(this).attr('href') });
    return false;
  });
});
Jul 20, 2009
#2 zerke2...@gmail.com
Thanks a million!  You got me on the right track and I found a solution that worked
for me.  This one uses the Ajax version.  In case anyone else would like to know how
I got this to work, here it is:

<script type="text/javascript">
$(document).ready(function() {
  $('#manual').click(function(e) {
    e.preventDefault();
    parent.$.nyroModalManual({
      url: 'test.php'
    });
    return false;
  });
});
</script>

<a id="manual" href="#">NyroModal - Manual Call</a>
Jul 21, 2009
Project Member #3 nyro...@gmail.com
Thanks anotherhero for your answer and thanks zerke2001 for letting us know what was
your solution.
Status: WontFix
Labels: Type-Other
Sep 19, 2010
#4 yschul...@gmail.com
I also found this inline coding to work, which is great when you have a large number of data rows that you want each to display their details in a modal.

<a href="#" onclick="javascript:parent.$.nyroModalManual({url:'THIS LINK'});">Click Text</a>