How to Open Popup using javascript!!!

Discussion in 'JavaScript' started by c0ngit, Jul 6, 2016.

  1. #1
    Hi everyone!

    i have a problem with html template same zopim!
    i want to code like picture.
    When i click to link id:
    [​IMG]

    then open popup (i don't know how)
    [​IMG]
    and: url will be show...
    [​IMG]

    Pls help me! thanks for all
     
    c0ngit, Jul 6, 2016 IP
  2. nomadingrey

    nomadingrey Member

    Messages:
    21
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    28
    #2
    I'm pretty sure the URL part (starting with #) is an anchor or a CSS ID. You can add it to any <div> or HTML tag. Whatever is inside that tag/anchor will be displayed in a modal popup when the action is called.

    W3Schools has a very good basic modal popup example using nothing but CSS and JS. This is a good place to start ~> http://www.w3schools.com/howto/howto_css_modals.asp

    I hope that helps!
     
    nomadingrey, Jul 6, 2016 IP
  3. c0ngit

    c0ngit Active Member

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #3
    thanks for support!
    @nomadingrey you can visit dashboard zopim and click to link Simulate Visitor on Zopim!
    you can see that!
    this mean i want to ask question. How to click and show popup ... include url .Ex: abc.com/?id=!#visitor_list/state#!1509487-bUfgBS0fU7r0Oo
     
    c0ngit, Jul 6, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    This can be accomplished in several ways. Assuming that the content of the popup is pulled from a database, you'll have to have an ajax call when a link or element is clicked. On success, that return data is shown in the modal window, which is simply a hidden div (or a created div) shown on the successful function call. The url can be updated via js as well.
     
    PoPSiCLe, Jul 6, 2016 IP
  5. c0ngit

    c0ngit Active Member

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #5
    Thanks @PoPSiCLe
    May be i need for Example popular
     
    c0ngit, Jul 6, 2016 IP