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
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):
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
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.