Problem with javascript open

4

I'm using the following code snippet:

window.open('provas-final.php','height=320, width=320', 'gl');

to open the file "proof-final.php" and in the command itself I am saying the width and height of the window that will open (320px), but when it executes, it opens a window totally opposite to the dimensions I am passing, according to image:

I searched the internet and saw examples just like mine, could anyone tell me what's wrong?

    
asked by anonymous 17.12.2014 / 19:52

1 answer

8

An argument is missing in your function call. The function expects window.open(URL,name,specs,replace) and you are only passing 3 arguments, so your second argument 'height=320, width=320' is being considered name . Do as follows:

window.open("home.php","_blank","height=320, width=320",false);

w3schools - If you need more information about the open() function check out this link.

    
17.12.2014 / 20:06