rfresh
07-13-2007, 06:05 PM
I'm trying to pass to a window.open function an argument for the window size (width and height) but the values are not working.
I debugged using alert(wide) to verify the value (800 in this case) is getting inside the popup function OK but in the window name arguments list, it is not working - it does not set the window width to 800. Do I have to specify the width and height parameters a specific way?
function popup(mylink, windowname, wide, high)
{
alert(wide);
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=wide,height=high,scrollbars=no,location=no,menubar=no,dependent=no,resizable=no,toolbar=no,le ft=100,top=0');
return false;
}
Thanks...
I debugged using alert(wide) to verify the value (800 in this case) is getting inside the popup function OK but in the window name arguments list, it is not working - it does not set the window width to 800. Do I have to specify the width and height parameters a specific way?
function popup(mylink, windowname, wide, high)
{
alert(wide);
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=wide,height=high,scrollbars=no,location=no,menubar=no,dependent=no,resizable=no,toolbar=no,le ft=100,top=0');
return false;
}
Thanks...