View Single Post
Old 01-03-2002, 12:48 PM  
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Centering Pop Up Java Script Question

Hi..
Can some one help me with this code?

The code works & functions fine, but I'd like the window to be in the center of the screen..What should I do?

Here's the code..

Code:
function openpopup(){
var popurl="eraser.htm"
winpops=window.open(popurl,"","width=450,height=140,")
}

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('poppedup')==''){
openpopup()
document.cookie="poppedup=yes"
}
}

loadornot()
Thanks

------------------
My Galleries suck, so please submit yours

I'm Fucking Starving..Sign Up for My Sponsors..

[This message has been edited by spacedog (edited 01-03-2002).]
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote