|
Sujet : [HS] ya des bon en javascript ici? |
| frenzy |
Negro a écrit a écrit :
bha, tu pourras me demander, j'ai netscaper 4.5 [:audi]
|
ça roule |
| Negro |
arf, j'ai relu ton probleme, et si tu rajoute un if?
function NewWindow(mypage, myname, w, h, scroll) {
if (screen.width=='800')
{
winprops = 'height='+h+',width='+w+',top=0,left=0,scrollbars='+scroll+',noresizable'
win = window.open(mypage, myname, winprops)
}
else
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresizable'
win = window.open(mypage, myname, winprops)
}
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } |