Any JavaScript Gurus Able to Help With A Lightbox?

Discussion in 'JavaScript' started by adammiller, Oct 22, 2008.

  1. #1
    Hey guys,

    My JavaScript is poor so go easy! I'm implementing a lightbox2 popover. I want to display a seperate page in the lightbox after a specified delay (in seconds).

    I'm trying to build a function to call using the html body onload... so far I've got this...

    
    function load()
    {
    	window.setTimeout(showlightbox(),8000);
    }
    function showlightbox()
    {
    	location.href = "pop.html" rel="lightbox" title="Pop";
    }
    
    Code (markup):
    ...obviously it doesnt work :D

    Anyone got any pointers?

    Cheers
     
    adammiller, Oct 22, 2008 IP
  2. rhoula

    rhoula Well-Known Member

    Messages:
    875
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Can you please send a link to a website where I see an example of what you are talking about.
    I will be more than happy to help you.
    Have a great day.
     
    rhoula, Oct 22, 2008 IP
  3. adammiller

    adammiller Peon

    Messages:
    184
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thats the problem, I havent seen anyone using lightbox2 to display another page with a delay.

    http://www.huddletogether.com/projects/lightbox2/ has examples of how the lightbox is used, but I need to find out how to make the lightbox display another page (needs to be called with 'rel="lightbox"' and be able to set a delay).

    Thanks for your reply.
     
    adammiller, Oct 23, 2008 IP