Full screen popup not working

sgupta

New member
Hi,

As a result of AJAX Call using Javascript, I want to show the response in a new popup window. I have written the following code, but its not working. A window opens up with the data, but it is not full screen.

var w = window.open(‘about:blank’, ‘Report’, “fullscreen”);
w.document.open();
w.document.write(this.responseText);
w.document.close();
w.moveTo(0,0);
w.resizeTo(screen.availWidth, screen.availHeight);

Also tried:

var params = [
‘height=’+screen.height,
‘width=’+screen.width,
‘fullscreen=yes’ // only works in IE, but here for completeness
].join(’,’);
var w = window.open(‘about:blank’, ‘Report’, params);
w.document.open();
w.document.write(this.responseText);
w.document.close();

Also Tried:
var w = window.open(’_blank’, “top=0,left=0,width=”+screen.availWidth+",height="+screen.availHeight);

Didnt work either.
Please suggest a solution.
 
Last edited:
Not sure whether the CEF on which ExeOutput is based handles passing parameters such as fullscreen.
We’ll check whether there is a workaround.
 
Try this:
var w = window.open("", "_blank", "top=0,left=0,width=" + screen.availWidth * devicePixelRatio + ",height=" + screen.availHeight * devicePixelRatio);

This is because most screens today have high resolution, and a CSS pixel is often made of more than one actual screen pixels.

Multiplying with DPR should set the popup size to actual width of screen.
 
Back
Top