wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript Window Open Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JavaScript Window Open" Watch "JavaScript Window Open" New topic
Author

JavaScript Window Open

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
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');
Nathan Hiemenz
Greenhorn

Joined: Oct 26, 2009
Posts: 2
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

Joined: Oct 08, 2008
Posts: 492
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)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look into window.open screen.availwidth

Eric
Nathan Hiemenz
Greenhorn

Joined: Oct 26, 2009
Posts: 2
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).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JavaScript Window Open
 
Similar Threads
Printing a open window using javascript
How to bring window in focus that is already open
Not Able to detect Javascript window open
opening new window in jsp
Submit a form via hyperlink