views:

22

answers:

1

I have a page with content loaded in via iframe, and the pictures within the content area open up in MilkBox, similar to LightBox. Here's the URL so you can check it out:

http://interplay2010.com/

Under the Media section, the pictures open up within the iframe. I would like the pictures to open up outside the iframe, but I have no idea how to do this.

+2  A: 

First of all your page loads much too slow. Try to use compression. You also use 15 external JavaScripts and 7 stylesheets and 20 external background images, thats quite a few HTTP Requests. You also mingle mootools with YUI. Why don't use just one Framework?

Enough nagging, now to your question: The milkbox is set up inside the iFrame, so in order to let the pics popup outside the iFrame you would have to alter Milkbox itself. That is 770 lines of JavaScript. Your best bet is to find the right method inside Milkbox, changing the target of the popUp to its parent frame; that is where the navigation and background picture resides in.

http://interplay2010.com/scripts/gallery/milkbox.js

Stephan Kristyn
I'm aware of all the excessive amounts of JS and CSS files. I didn't create the original website; I just create all the stuff inside the content areas. Using iframes and tons of other files made it easier for me to not interfere with the page's animation functionality. I wouldn't know how to do what it is you're recommending; I am not good at writing JS. I was hoping someone would be able to give me snippet of code that would *magically* make it work. But thanks, though!
Robert Pessagno
Then your best bet is not to use iFrames and put Milkbox in a absolute positioned DIV. There is no need for iFrames these days except you need the asynchronious behaviour of iFrames in combination with JavaScript (AJAX). The Milkbox Program is complex stuff, to integrate a frame/target functionality would take a lot more time than finding a solution that simply omits the usage of frames.
Stephan Kristyn