How do I/

Discussion in 'HTML & Website Design' started by Xtrapsp, Nov 30, 2010.

  1. #1
    Hey guys.

    2 Questions?

    1. On a site called Ro2.biz (Paid to chat) There is a support us button inwhich you open it and it refreshes the page I think. Can someone give me an idea as to how this works?
    2. Some websites open a popup where its a tiny window (Shrinked as small as can be) and it plays a youtube video. How is this done?


    Thanks in advance guys!
     
    Xtrapsp, Nov 30, 2010 IP
  2. karthimx

    karthimx Prominent Member

    Messages:
    4,959
    Likes Received:
    127
    Best Answers:
    2
    Trophy Points:
    340
    #2
    the pop up youtube video is done by javascript / jquery
     
    karthimx, Nov 30, 2010 IP
  3. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #3
    Is this what you want?

    
    <form>
    <input type="button" value="New windows" onClick="window.open('http://forums.digitalpoint.com/showthread.php?t=2017369#post15376381','mywindow','width=400,height=200')">
    </form>
    
    Code (markup):
     
    jeremyhowell, Nov 30, 2010 IP
  4. Xtrapsp

    Xtrapsp Active Member

    Messages:
    716
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    90
    #4
    Dude yea. But whats the code etc?


    Can you make it so its not a button? I wanted it so that one code to show how the button would work as a popup and a seperate code to make a hidden popup?

    Thanks dude
     
    Xtrapsp, Nov 30, 2010 IP
  5. HarryTG

    HarryTG Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    <html>
    <head>
    <script type="text/javascript">
    <!--
    function Popup() {
    window.open("http://www.youtube.com/", "Window", 
    "status = 1, height = 300, width = 300, resizable = 0")
    }
    //-->
    </script>
    </head>
    <body onLoad="Popup()">
    
    <form><input type="button" onClick="Popup()" value="As a button"></form>
    <a onClick="Popup()">As a link</a>
    
    </body>
    </html>
    Code (markup):
    If you dont want it to load when the page opens, just remove the <body onLoad="Popup()"> part.
     
    HarryTG, Nov 30, 2010 IP
  6. avermat

    avermat Member

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    For the video popup just search Google for "lightbox".
    Here's a popular one: videolightbox.com
     
    avermat, Dec 17, 2010 IP