25. juni 2005 - 12:51Der er
11 kommentarer og 1 løsning
Popup, Centrer + 100px til venstre
Hej :-)
// Aaben nyt vindue function nytVindue(url,name,win_height,win_width) { pos_horizon = ((screen.width/2)-(win_width/2)); pos_vertical = ((screen.height/2)-(win_height/2)); window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon); }
Ovenstående script bruger jeg til, at åbne og centrere et popup-vindue. Men hvordan tilføjer jeg, at scriptet stadig skal centrere popupen, men også placere sig f.eks. 100px mod venstre?
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.