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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controlling width/height of pop-up window in Netscape

Status
Not open for further replies.

gghoyt

Programmer
May 13, 2002
6
US
Hi,

I'm using the code below in the <head> section of a page to open a new window that fills the screen. It works fine in IE but I can't get it to work in Netscape. Netscape just ignores the code and opens a window that's approximately one-inch square. It's tiny!

<SCRIPT LANGUAGE=JAVASCRIPT TYPE=&quot;TEXT/JAVASCRIPT&quot;>
<!-- Hide script from old browsers

widthBrows = 750
heightBrows = 550

if (screen) {
widthBrows = screen.availWidth-20
heightBrows = screen.availHeight-30
}



// End hiding script from old browsers -->
</script>


I'm opening the window from a Flash movie using this code:
on (release) {
getURL(&quot;javascript:launchwin('
}

Can anyone tell me why this won't work in Netscape? Is there something different that I need to do to accomodate for Netscape? I even tried just opening new windows from an html page using some other code but nothing I try seems to be able to automatically maximize the window in Netscape.

Any help would be greatly appreciated!
Thanks,
Gwenn
 
hi Gwenn,

window.screen.width and window.screen.height should work in NS & IE.

======================================

if (!succeed) try();
-jeff
 
You put the variables inside the quotes in your call to the popup window, rather than outside quotes so the value would be used. Is that correct, or should it be like:


getURL(&quot;javascript:launchwin(' + &quot;widthBrows + &quot;,height=&quot; + heightBrows + &quot;');&quot;);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top