From: roN on
Hi,

Why isn't following not working,
well, it opens a windows but not with the size, passed to the function in
variable w & h. Thank you

function open_window(URL,title,w,h)
{ window.open(URL,title,"width=w,height=h,left=100,top=200,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no");
}

i call it like:
onclick="open_window('admin.php','Admin',100,100)"

but it's not working as expected, why not? The size is not correct :(
Thanks for hints!
--
chEErs roN

I'm root, I'm allowed to do this! ;)
keep on rockin'
From: web.dev on

roN wrote:
> Hi,
>
> Why isn't following not working,
> well, it opens a windows but not with the size, passed to the function in
> variable w & h. Thank you
>
> function open_window(URL,title,w,h)
> { window.open(URL,title,"width=w,height=h,left=100,top=200,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no");
> }

That is because you have not separated your variables from the string.

window.open(URL, title, "width=" + w + ",height=" + h + ",left=100,
....etc...";

From: roN on
web.dev wrote:

>
> roN wrote:
>> Hi,
>>
>> Why isn't following not working,
>> well, it opens a windows but not with the size, passed to the function in
>> variable w & h. Thank you
>>
>> function open_window(URL,title,w,h)
>>
{ window.open(URL,title,"width=w,height=h,left=100,top=200,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no");
>> }
>
> That is because you have not separated your variables from the string.
>
> window.open(URL, title, "width=" + w + ",height=" + h + ",left=100,
> ...etc...";

yup, that's it. thank you!
--
chEErs roN

I'm root, I'm allowed to do this! ;)
keep on rockin'