Popping up a page that's less than full size?

Discussion in 'HTML & Website Design' started by bob25, Apr 21, 2009.

  1. #1
    Anybody know how to make a link that pops up a page that's less than full size? For instance, a page that pops up, but only fills up 70% of the screen.

    Thanks
     
    bob25, Apr 21, 2009 IP
  2. sizzlefire

    sizzlefire Member

    Messages:
    397
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Try using this: (change the following two lines to fit your site)

    <input type=button value="Open the Popup Window" onClick="javascript:popUp('wiredtron.com')">
    Code (markup):
    'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=200,left = 476,top = 332');");
    Code (markup):

    
    <!-- TWO STEPS TO INSTALL POPUP WINDOW:
    
       1.  Paste the first into the HEAD of your HTML document
       2.  Use the code to open the popup page on your site  -->
    
    <!-- STEP ONE: Copy this code into the HEAD of your HTML document  -->
    
    <HEAD>
    
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Idea by:  Nic Wolfe -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=200,left = 476,top = 332');");
    }
    // End -->
    </script>
    
    
    <!-- STEP TWO: Use the following button code for the new window -->
    
    <form>
    <input type=button value="Open the Popup Window" onClick="javascript:popUp('wiredtron.com')">
    </form>
    
    <!-- Script Size:  0.73 KB  -->
    
    
    Code (markup):
     
    sizzlefire, Apr 21, 2009 IP
  3. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Thanks for the code, but how do I make the pop up for a hyperlink?

    For instance, Click here to visit the website.

    Maybe several links throughout the page. So if a visitor clicks on a link they won't leave the site, but they know it's a pop up window.

    Thanks
     
    bob25, Apr 21, 2009 IP
  4. sizzlefire

    sizzlefire Member

    Messages:
    397
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    35
    #4
    That does, if you put it in the page you want the button on, then you click the "click here to open popup window" and it will open.
     
    sizzlefire, Apr 21, 2009 IP