View Full Version : Need screen resolution popup script when clicking on a link.

01-23-2007, 05:07 PM
:confused: I need a script that would popup a window depending on the user screen resolution once they click on a link.

For example if the user has a screen resolution of 1024 by 768 or lower they would get a pop up window with say page1.html when they click on the link, but if their screen resolution is 1152 by 864 or higher they get page2.html

Thank you in advance for your help.

01-23-2007, 05:46 PM
Right know I have to use two scripts to popup the window to the correct page so that the popup is also the correct size.

And I have two have two separate links for the user to choose from.

It would be ideal if they just could click on one link and have the script determine based on their resolution what page to send them to.

Blelow are the scripts I'm using


<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width=940,height=686,left = 170,top = 169');");
// End -->

<script type="text/javascript">

//Popup Window Script

function openpopup(popurl){
var winpops=window.open(popurl,"","width=1040,height=778,resizable,scrollbars=yes,left = 120,top = 123")

and this is how the links on the page look



01-24-2007, 03:58 PM
Could it be that this is only possible by using a javascript and PHP?