This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaScript Window Open  RSS feed

 
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I just want to open a window with full size I mean fit to maximized size. I tried with the code but it's opening in the size 800 X 600(I hard codded). I need it in 100% X 100%. Please assit me.

window.open('b.html','popUpWindow','width=800,height=600,left=0,top=0,status=no,toolbar=no,location=no,menubar=no,titlebar=no');

Not working
window.open('b.html','popUpWindow','width=100%,height=100%,left=0,top=0,status=no,toolbar=no,location=no,menubar=no,titlebar=no');
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:

window.open('b.html','popUpWindow','fullscreen,scrollbars,resizable,toolbar,menubar,location,status');

This should mimic a maximized browser in both Internet Explorer and Firefox.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I slightly altered the code after that it's working fine in Firefox but not in IE.


In IE it's opening a window in fullsize(Even not able to see the titlebar close button)
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into window.open screen.availwidth

Eric
 
Nathan Hiemenz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Meet Gaurav wrote:I slightly altered the code after that it's working fine in Firefox but not in IE.


In IE it's opening a window in fullsize(Even not able to see the titlebar close button)



This is in interesting nuance of IE. In local code (eg if you run the file from your harddrive) the code snippet I gave will open the window as a literal fullscreen (no menu, nothing), but do to the security settings for "web" code, if you upload the piece to a website and run it, it will open in a new window like normal. Here's an example:

http://www.realmprotectors.com/testy.html

View the source and it's the same I gave you (possibly in a different order).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!