2

I have a web application which the customer requested that the browser window size will be changed when clicking on different buttons.

I found in that link that running the "chrome.exe" process with "--app" is very useful since the following javascript code will work even though it is not a child window:

window.moveTo(580,240);
window.resizeTo(800,600);  

Is there any equivalent in Firefox and IE for this "--app" mode ?
Thanks !

Community
  • 1
  • 1
liorafar
  • 2,264
  • 4
  • 19
  • 39
  • You might want to check out the firefox [command line options](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options). Another [relevant SuperUser Post](http://superuser.com/questions/55915/launching-firefox-into-chromeless-mode-from-command-prompt) that might come in handy. – Vivek Pradhan Oct 29 '14 at 10:00
  • Checked it already and did not find anything useful. Thanks anyway! – liorafar Oct 29 '14 at 10:02

1 Answers1

1

I was able to answer my own question. however it must be done through child window. At first i tried to do the following:

var win = window.open(url);
win.resizeTo(800, 600);  

That worked only when the parent window was alive. when i closed the parent, it did not work.
However the following function works even though you close the parent window:

window.resizeTo(800,600);    

it works for all IE, Firefox and Chrome.
thanks !

liorafar
  • 2,264
  • 4
  • 19
  • 39