SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict WillisTi's Avatar
    Join Date
    Sep 2005
    Location
    Bristol, ENG
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Lightbox to pop-up on page load

    Hey,

    I'm wondering if itís possible to use the Lightbox JS so that it pop-ups on page load and not when the user clicks an image?

    Basically want to use it like a pop-up window which will announce something because standard pop-up windows suck. Whatís the current trend for pop-up windows anyway?

    Cheers

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everybody hats pop up windows but lightbox/greybox ones seem to be the trnd now. you could create an html page and then at the very begining of the page have ti call the lightbox script.

  3. #3
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Instead of using Lightbox JS, why don't you use Lightbox Gone Wild, it's for the exact purpose you're after. I haven't looked at it, but you would have to do something like this:
    Code:
    window.onload = function() {
      lightbox();
    }
    where lightbox() is the function you would normally call with an onclick event, but of course it's perfectly ok to have it run when the window loads.

  4. #4
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    give this a shot. might be a lot easier to work with.
    http://frankleng.me/2010/07/21/drupa...-on-page-load/

  5. #5
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put something like this in your page.

    <a id="firstlink" href="thelink.html" rel="lyteframe" title="" rev="width: 635px; height: 465px; align: center; scrolling: no;"></a>

    In the lightbox script is an initializing part which starts the lightbox when the pages is loaded.
    Trigger it to the firstlink ID.


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
  •