View Full Version : Forcing resizing a window after execution

18 Nov 2010, 5:59 AM

I started with Ext JS and I seek a solution to the problem that I can find no solution.

I have a NAS server on which I create an application, when I click on the link to it, it opens a window with width and a default height.

These dimensions I can not change them in the NAS.

I just want my application to add a few lines of code to force the resizing of my application after its launch, for example:

width = 500px
height = 1000px
minimize = false
etc. ...

Thank you for helping me.

18 Nov 2010, 8:03 AM
Are you talking about resizing the browser window after it has rendered?

18 Nov 2010, 8:23 AM
I speak of the default size that gives the NAS to my application and I want to change. (I have his ID)

Something like this:

Ext.onReady (function () {

var w = MyActiveWindow ({
height: 50,
width: 100,
closable: false,
draggable: false,
resizable: false,

It's possible ?

Thank you

26 Nov 2010, 6:29 AM
If you are referring to the active window that was launched by your NAS, you simply need something like this:

Ext.onReady(function() {

28 Nov 2010, 8:20 AM
Thank you for your reply, however that does not work.

I tried with no result:

- window.resizeTo(100,50);

- this.window.resizeTo(100,50);

- window.parent.resizeTo(100,50); <-- This resizes my browser

I have the Id of this window and the Id of the shadow.

It can be used? If so, how?

Thank you again for your help.

28 Nov 2010, 12:57 PM
I think he means a Synology NAS. They use windows in the web ui that are created with Ext.

29 Nov 2010, 12:05 AM
Yes it's for Synology NAS. I think this is the line that creates the window with the default dimensions.

SYNO.SDS.LegacyAppWindow.superclass.constructor.call(this,Ext.apply({width:this.jsConfig.width||800,height:this.jsConfig.height||600,html:String.format('<iframe id="{0}" src="{1}" frameborder="0" style="border: 0px none; width: 100%; height: 100%;"></iframe>',this.iframeId,Ext.SSL_SECURE_URL)},a));
Thank you.

29 Nov 2010, 12:10 AM
If you point me to their manual on how to create an application for the NAS, then maybe I can give you advise on how to change the dimensions of the Ext window your application runs in.

But normally you would:

Ext.onReady (function () {
var w = new Ext.Window({
renderTo: Ext.getBody(), //or another element's id
height: 50,
width: 100,
closable: false,
draggable: false,
resizable: false


update: And check which Ext version your NAS is running.

29 Nov 2010, 1:30 AM
Thank's devtig,

To my knowledge there is no documentation for using ExtJS on the Synology server.
The following tests I have done.

<script type="text/javascript">

var id_test = window.parent.document.getElementById("sds-desktop");

Ext.onReady (function () {
var w = new Ext.Window({
renderTo : id_test,
setTitle : "my title", //not working
height : 100,
width : 150,
left : 300, //not working
top : 300, //not working
closable : true, //icon appears, working so close that small window before the other (800x600)
minimizable : true, //icon appears, but not working
maximizable : true, //icon appears, working
draggable : false, //with true, this window don't appears , error: uncaught exception: Error listening for "mousedown". Element "ext-comp-1001" doesn't exist.
//with false, if a click resizing then this changes the body of the big window (800x600)
resizable : true, //with true, icon appears, but resizable not working
shadow : true //shadow appears but not properly (default is true)

// alert(Ext.version); //version ExtJS 3.2.1


Also this new window is blocked on the screen ...