Quantcast

Shadowbox out of iFrame?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Shadowbox out of iFrame?

LuuK
This post was updated on .
The Last post describes the Problem a little bit more in detail =)...so i deleted this one! Thx for replys!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shadowbox out of iFrame?

mjijackson
Administrator
I'm not sure. You'd have to load Shadowbox in the parent frame and then figure out how to make a JavaScript call to that frame.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shadowbox out of iFrame?

LuuK
hm, yea, I think the direction is the right one...and the call-script could be something like this (I just don't know how to adapt it to shadowbox...)

<script type="text/javascript"> var links = $$('.lightwindow_iframe_link'); links.each(function(link) { Event.observe(link, 'click', function() {parent.myLightWindow.activate(null, link);}, false); link.onclick = function() {return false;}; }); </script> 

I understand what it does, but I'm not that good in Javascript that I could write the same for shadowbox^^ (I dont know the "nodes" or whatever it is called to link in the shadowbox.js --> what is ".lightwindow_iframe_link" in shadowbox (does it even exist when shadowbox hasn't that feature?) btw. what is "myLightWindow.activate" in shadowbox.js??)...Do you think it would be also possible with the YUI as adapter? Means the scriptacolus.js (with prototype.js & effects.js) isn't absolutly necessary?

thx 4 your reply!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shadowbox out of iFrame?

LuuK
First of all a big thx to you Michael, shadowbox is already the king of "boxes" =)!

I use shadowbox on several sites University Site and I would like to use it on our Event & Booking Site (just a prototype, it's not really online (official) now because it's not finished yet) but there's the problem (on the Booking Site I'm using lightwindow right now because I wasn't able to open shadowbox out of an iFrame...):

I'm working (on this site) with iFrames because I couldn't find a solution of "inlineboxes" which create scrollbars automaticly when the content clips the box (this is not always the case) --> when somebody can tell me how to do this with div-containers, I would be very grateful because I tried, but it didn't work (the div fittet the content and not the other way round^^) ... ok, that's the reason I use iFrames and that's where my problem begins (ergo: if I hadn't to use iFrames, my problem would be solved =D): <u>How can I open a shadowbox (the link with class="shadowbox" is in the source html file of the iframe) over the whole page out of an iframe??</u> 

I started a thread in the support forum (here) where (maybe) a direction to a solution crystalized out --> shadowbox.js in the parent site (which holds the iframe) and then call that parent window/site/whatever from inside the iframe with a js-call ... I think it could work because it works in lightwindow with this script (to insert after the link)

<pre>< script type="text/javascript">
        var links = $$('.lightwindow_iframe_link');
        links.each(function(link) {
                Event.observe(link, 'click', function() {parent.myLightWindow.activate(null, link);}, false);
                link.onclick = function() {return false;};
        });
</script> </pre>

but I don't know how to adapt it to shadowbox (I can read & understand the most of a JavaScript File but I'm not that good in it to write somthing like that myself...maybe in 6 months or so =D) btw. what's analog to ".lightwindow_iframe_link" & "myLightWindow.activate" in the shadowbox.js (does somthing like that exist at all??) and last but not least: LightWindow uses the prototype framework (with scriptacolus.js & effects.js)...do I have to use this framework as adapter with shadowbox to run it out of an iframe?

Thx to anyone who reads this bunch of problems =))
Loading...