SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2005
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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?

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

  2. #2
    SitePoint Enthusiast nimpkish-media's Avatar
    Join Date
    Jun 2010
    Location
    Victoria BC, Canada
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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/
    Dan G
    Marketing Strategist & Consultant

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2005
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there any reason why you can't ask that company?
    Dan G
    Marketing Strategist & Consultant

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2005
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2005
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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/

    http://tac.nvcc.edu/ssuh/jquery.fanc....1/index2.html - works with default of 75&#37;

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

    Code:
    $("#various3").fancybox({
    				'width'				: '590',
    				'height'			: '260',
    				'autoScale'			: false,
    				'transitionIn'		: 'none',
    				'transitionOut'		: 'none',
    				'type'				: 'iframe', 
    			
    			
    			});

  8. #8
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Dan G
    Marketing Strategist & Consultant


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •