I can get this to work which opens a fancybox IMAGE from within an iframe
<a href="javascript:parent.$.fancybox.open({href : 'myurl'});">Open something</a>
Problem I have is that I need to open a fancybox IFRAME. Example code or any ideas would be greatly appreciated.
Thanks
I can get this to work which opens a fancybox IMAGE from within an iframe
<a href="javascript:parent.$.fancybox.open({href : 'myurl'});">Open something</a>
Problem I have is that I need to open a fancybox IFRAME. Example code or any ideas would be greatly appreciated.
Thanks
Share Improve this question edited May 2, 2012 at 4:31 danielrt9 asked May 2, 2012 at 1:40 danielrt9danielrt9 552 silver badges8 bronze badges 2- Check stackoverflow./a/8855410/1055987 – JFK Commented May 2, 2012 at 2:10
- possible duplicate of call Fancybox in parent from iframe – JFK Commented May 2, 2012 at 2:13
1 Answer
Reset to default 3Simply, set type iframe
:
<a href="javascript:parent.$.fancybox.open({href : 'myurl', type: 'iframe'});">Open something in iframe</a>
But you should do it only when you need to have different options, because you can open other page withing iframe like:
<a href="myurl">Open something in iframe</a>