PDA

View Full Version : Lightbox - how to open iframe inside lightbox instead of image



huzefa086
12-08-2011, 11:03 AM
Hello

I have downloaded this lightbox2.03a.zip

But i want to open iframe inside the lightbox popup on load of the body.

I do not want any anchor or HREF.

I have done this with this function :

function initLightbox() { myLightbox = new Lightbox();
var firstLight;
if(firstLight=document.getElementById('the_first'))
firstLight.onclick.apply(firstLight);
}
Event.observe(window, 'load', initLightbox, false);


But this is for the anchor and images, I am not able to open iframe inside this.

Can anyone please help

Thanks in advance

jscheuer1
12-08-2011, 02:49 PM
Lightbox doesn't do iframes. I'd recommend Fancybox:

http://fancybox.net/

But there are others:

http://colorpowered.com/colorbox/

and:

http://www.p51labs.com/lightwindow/

And I'm sure there are tons of others if you Google around with terms like iframe and lightbox.