Gallery out of iframe // Wizzud I summon you!!

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Gallery out of iframe // Wizzud I summon you!!

taihan
This post was updated on .
hi,
I have noticed this proplem when trying to fire up a image gallery shadowbox through a already opened up iframe shadowbox.


parent html:

<script type="text/javascript"> Shadowbox.init({ language:'de', slideshowDelay:10, continuous:true, handleOversize:'drag', counterType:'skip', players:['flv','html','iframe','img','qt','swf','wmp'] }); </script>

iframe html:

<head>
<script type="text/javascript"> function blah() { var a0 = { player: 'img', content: '../img/v2.jpg', title: '[title] - [year]qwed' }; var a1 = { player: 'img', content: '../img/v2.jpg', title: '[title] - [year]qwed' }; window.parent.Shadowbox.open([a0, a1]); }; </script></head>
<body>
  <div id="container">
   
    <div class="x" style="left:423px;top:148px;" onclick="blah();" target="_top">
     
    </div>
  </div>
</body>


Well this script wroks perfectly outside of the iframe. but in the iframe shadowbox seems to have trouble. I got this fare and found the error source. I seems that window.parent.Shadowbox.open([a0, a1]);  can't stand together at the same time. window.parent.Shadowbox.open(a0); works but then its just one image and  i want to have them in a gallery. Shadowbox.open([a0, a1]); works too but this way its inside the iframe and gets cut by the viewport.
So what i want is window.parent.Shadowbox.open([a0, a1]); to work properlly.
Does anyone have a solution or a workaround?

I really appreciate it!!