How can I create a see through popup like this one

Discussion in 'HTML & Website Design' started by adsenseplr, Sep 27, 2012.

  1. #1
    Hi,
    Any one point me in the right direction of how I can do a see through pop up, like the ones found under 'biography' on this site http://www.charteris.com/about-us/board-members the 'biography' link is under each of the peoples pictures. All help much appreciated. Been on DP a while but first time post in this section. All advice welcome. I note DP runs a similar see through pop up when you first hit the homepage.
    Cheers
    Dickie
     
    adsenseplr, Sep 27, 2012 IP
  2. kcherrix

    kcherrix Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    Hi Dickie,
    Have you had any luck with this? I'm trying to do something similar.
    Thank you,
    Kim
     
    kcherrix, Mar 22, 2013 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    It simply uses javascript onclick event handler to make the bio display. This is a particularly badly done example, one that I would not at all suggest anyone use. Its major failing is the absence of any sort of graceful failover. You may access the jquery script for details (which should have been your first stop).

    See http://en.wikipedia.org/wiki/Lightbox_(JavaScript)

    g
     
    kk5st, Mar 23, 2013 IP
  4. kcherrix

    kcherrix Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    Thank you, I did go to jquery, but being I am fairly new to javascripts, I was hoping there was something a little simpler. I tried the lightbox application but I couldn't get text with the images. There were so many scripts in the jquery library, I was overwhelmed... yes, I am that dumb when it comes to scripts... but I am learning. I also need to have the popup launch when you click on a certain image so I'm using map and am not sure how to launch the popup from within the map tag.
     
    kcherrix, Mar 23, 2013 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    I haven't a clue what it is, exactly, that you're specifically trying to accomplish, but I suggest that you first build a useful and usable page without any javascript. Once built, you will have a stable platform on which to connect your bells and whistles. A little bit of study and trying things will get you going.

    For a simple example of a similar bell or whistle (who knows which it is) see Swapping Images with Javascript.

    cheers,

    gary
     
    kk5st, Mar 23, 2013 IP
  6. kcherrix

    kcherrix Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #6
    I do have a complete and useable website. It works perfectly fine and now I, and I could publish as is, but I want to add bells and whistles....one, being the ability to have a modal popup containing a picture and a bio for the person whose name you click on, There will be a picture of an organizational chart with slices on each block to allow a clickable area on the chart. Once I figure out how to create the modal popup, then I need to figure out how to call the popup from within the image maps.
     
    kcherrix, Mar 25, 2013 IP
  7. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #7
    It is best to use jquery.
    But if you rather go with simple javascript, you can create divs with 'display:none'. The content of the div can be prefilled with bio and image. When the user clicks on a particular name, show the information by changing the display property of the div. The layout of the modal dialog can be controlled using CSS properties - position and float, z-index and opacity. If you would like to go a step further, instead of creating multiple divs and prefilling the data, you can have just one div and use ajax to get the data of that particular person by passing id or name in the ajax call.
     
    lkraj, Mar 26, 2013 IP