Creating a popup window that appears after clicking a menu item in Joomla is very easy as a first step. In the menu item editor, select System Links->External URL as the menu item type and choose New Window Without Navigation from the Target dropdown.
This causes the menu item — more precisely, the <a> element inside the <li> element — to receive an onclick attribute containing the following default code:
window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes, resizable=yes');return false;
If we now want to adjust the size of the target window, we can do so using the width and height parameters. The position can be specified using left and top. Our target function could therefore look like this, for example:
window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes, resizable=yes,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-232.5)+',width=600,height=465');return false;
We can add these missing parameters in Joomla under Extensions->Modules. In the menu module editor, select the Advanced tab and enter the following values:
left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-232.5)+',width=600,height=465
in the Target Position field.
