noidtluom Posted October 5, 2007 Share Posted October 5, 2007 Hello all, I'm terrible at javascript, and I've hardly ever used it before. I'm trying to make a popup appear at the center of the page, and this is what I have so far: <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=<? echo "$width"?>,height=<? echo "$height"?>,left=500,top=' + ((screen.height - height) / 2) : ');"); } // End --> </script> That's the code for the javascript function, can you see if you can find anything wrong with it? (Note: the code to call the function seems to be fine) Quote Link to comment Share on other sites More sharing options...
fenway Posted October 7, 2007 Share Posted October 7, 2007 I'm confused... just use clientWidth and clientHeight. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.