Embed javascript in a lightbox way

Hi, we have a script that shows a video player. Is there a way to have it open in an external window a la lightbox?

<script type="text/javascript" src="srcfile"></script>

no sorry, I used to use thickbox, but as that isn’t maintained any more they list fancybox as one of the alternatives on their site.

have you had any expereince working with fancybox? I’m trying to get the size and width set to the dimseions of the iframe but it no longer centers. And eveyrthing is transparent.


http://tac.nvcc.edu/ssuh/jquery.fancybox-1.3.1/index2.html - works with default of 75%

Then click on iframe. The code below doesn’t seem to work.

				'width'				: '590',
				'height'			: '260',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe', 

The demo person said they havne’t seen it done before.

anways i opened their js file, and it’s just a document.write to an iframe. I think i got it working with fancybox. I really appreciate your help! Sitepoint is the best!

Do you mean you want to video to open in a lightbox style window?

If that’s the case, you should take a look at ShadowBox. I have used it before with flash videos.

lightbox doesn’t open in an external window, it’s a modal window, and strictly speaking just a couple of divs and some css magic to make it look like another window.

if you search for video lightbox you find a couple of things that might help you, such as http://fancybox.net/

yea we want it to open video. The only thing is the video player is not on our website. The company provided us with javascript to link to it.

<script type=“text/javascript” src=“http://www.external.com/filename.js”></script>

I wasn’t sure if you can use script tags with the lightbox effect.

is there any reason why you can’t ask that company?