How to have pop-ups inside your page

Discussion in 'PHP' started by SIAWebDesign, Dec 9, 2009.

  1. #1
    Hi All,

    I've seen more and more sites doing this nowadays. Having pop-ups inside their pages which is not really a pop-up, but in catches the focus of the page to a new square box that opens up.

    I've seen godaddy do it, and facebook does it too with their own message boxes. And I just found a similar example here: http://videolightbox.com/vista-template.html

    Could anyone give me a brief explanation of how it's done? Or at least let me know what they're called so I can google them.

    I find them a lot nicer than an actual pop-ups.
     
    SIAWebDesign, Dec 9, 2009 IP
  2. markowe

    markowe Well-Known Member

    Messages:
    1,136
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Yes, these are often referred to as lightbox popus. I'm sure someone will give you a better explanation than me, I have never done one but I am 99% sure they are just a DIV that is positioned centrally on the screen but hidden with JavaScript. Presumably the "darkening" effect on the rest of the screen is also a semi-transparent black DIV that covers the whole screen and is also hidden or shown with JS as required. Popup blockers won't stop it because it is not a JavaScript popup, just an HTML element hidden or revealed with JS. If someone has JS deactivated then it will not appear, but then there's not much use for the net these days without JS...

    P.S. Oh yes, so that means this is the wrong forum for this question :) The JavaScript forum is probably a better bet.
     
    Last edited: Dec 9, 2009
    markowe, Dec 9, 2009 IP
  3. mukunthan

    mukunthan Active Member

    Messages:
    237
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53