Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Window Size 1

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Hi Folks,

I am using the function below to open a page in a new window. I want to open the page up so that it is fullscreen - but with all menus, toolbars etc.

However, it is not opening fullscreen - for some users it only opens in a tiny window.

function loadCompany(compLink)
{
companyWin = window.open(compLink, "companyHome", "width=screen.availWidth,height=screen.availHeight,top=0,left=0,menubar=yes,toolbar=yes,status=yes,scrollbars=yes,titlebar=yes,resizable=yes");
companyWin.focus();
}

I have tried using screen.height and screen.width but that doesn't work either. Any advice.

Mighty
 
You're throwing a javascript expression into a string, why not build the string with the expression?
Code:
function loadCompany(compLink)
{
companyWin = window.open(compLink, "companyHome", "width=[!]" + screen.width + "[/!],height=[!]" + screen.height + "[/!],top=0,left=0,menubar=yes,toolbar=yes,status=yes,scrollbars=yes,titlebar=yes,resizable=yes");
companyWin.focus();
}

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Duuuuhh!!!

How stupid am I???

Mighty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top