J
johnney
hi.
I'm very new to javascript so please be patient with me. I want to cause a
popup window to open, but in a random position on the screen. I've tried
this but it doesn't work:
<body onload="window.open('hello.htm', 'newWindow',
'scrollbars=0,resizable=0,height=30,width=30,left=xaxis,top=300')">
<SCRIPT LANGUAGE="JavaScript">
var xaxis= Math.round(Math.random()*4);
</script>
does anyone know why the positioning values can't be variables. When i
substitute a variable for the height or width it works okay, but when i use
one for the left or top value it is ignored?
Any help would be appreciated
I'm very new to javascript so please be patient with me. I want to cause a
popup window to open, but in a random position on the screen. I've tried
this but it doesn't work:
<body onload="window.open('hello.htm', 'newWindow',
'scrollbars=0,resizable=0,height=30,width=30,left=xaxis,top=300')">
<SCRIPT LANGUAGE="JavaScript">
var xaxis= Math.round(Math.random()*4);
</script>
does anyone know why the positioning values can't be variables. When i
substitute a variable for the height or width it works okay, but when i use
one for the left or top value it is ignored?
Any help would be appreciated