PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Javascript » Bug #3200

popup ignores last parameters

Details

Submitted2005-01-14 15:27 UTC
Fromcmoehrke at netviser dot de
StatusBogus
PackageHTML_Javascript
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2005-01-14 15:27 UTC] cmoehrke at netviser dot de

Description:
------------
The method popup() ignores the last two parameters, defining the porition of the window. It expects the values to be in the options array. Either the documentation or the code is wrong.
popupWrite behaves as descriped in the API-documentation.

Reproduce code:
---------------
// Doesn't work
$options = array ("no",
"no",
"no",
"no",
"no",
"no"
);
echo $js->popup("var1","http://www.example.com","Titel",200,200,$options,500,500);

// Works but is - according to the documentation - wrong
// Doesn't work
$options = array ("no",
"no",
"no",
"no",
"no",
"no",
500,
500
);
echo $js->popup("var2","http://www.example.com","Titel2",200,200,$options);

Expected result:
----------------
var1= window.open("http://www.example.com", "Titel", "width=200, height=200,resizable=no, scrollbars=no, menubar=no, toolbar=no, status=no, location=no, top=500, left=500")
var2= window.open("http://www.example.com", "Titel2", "width=200, height=200,resizable=no, scrollbars=no, menubar=no, toolbar=no, status=no, location=no, top=, left=")

Actual result:
--------------
var1= window.open("http://www.example.com", "Titel", "width=200, height=200,resizable=no, scrollbars=no, menubar=no, toolbar=no, status=no, location=no, top=, left=")
var2= window.open("http://www.example.com", "Titel2", "width=200, height=200,resizable=no, scrollbars=no, menubar=no, toolbar=no, status=no, location=no, top=500, left=500")