[Javascript] Popup script and arguments
Paul Novitski
paul at juniperwebcraft.com
Thu Aug 10 10:24:52 CDT 2006
At 07:46 AM 8/10/2006, Guillaume wrote:
>function popitup(url) {
> newwindow=window.open(url,'name','height=200,width=150');
> if (window.focus) {newwindow.focus()}
> return false;
>}
...
>My question is: How to have the width and height arguments not
>managed in the script, but inline, such as:
>
><a href="popupex.html" onclick="return
>popitup('popupex.html','height=200,width=150')"
> >Link to popup</a>
function popitup(url, parameters)
{
newwindow = window.open(url, 'name', parameters);
if (window.focus) {newwindow.focus()}
return false;
}
...where 'parameters' can be any legal parameters for the
window.open() function.
Paul
More information about the Javascript
mailing list