on 01-13-2012 9:51 AM
How can I set the size of the Browser window programatically when running a WDJ application .. ? I want to set size of the Window to fit to my application.
You could embed a 1 pixel iFrame in your WDJ application, which embeds an html file with JavaScript code to resize the browser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrzej Wanicki,
Please use window.setWindowSize(width,height) method to set the custom height and width of the embedded apllication window.
PFB the usage procedure, it will work.
IWDWindow window =null;
window=wdComponentAPI.getWindowManager().createModalWindow(popupWindowInfo);
//Setting the PopUp window Title, Size and Alignment//
window.setTitle(sButtonAction);
window.setWindowPosition(WDWindowPos.CENTER);
window.setWindowSize(popupWidth , popupHeight);
window.show();
With Regards,
Ramesh G.
Thanks Robin .. I tried ur suggestion and it just resizes the iFrame and not the browswe window. Is this something u had done successfully in the past ?.
Ramesh - I am not creating a new Window .. I am talking about the size of the application window when running the application e.g. when when on a WDJ component open the Applications node and then select the myApp right click and "Run" (assuming already deplyed), this will run the application, opening a browser window to do so.
Hi,
I think your javascript call is incorrect.
Depending on how your WDJ application is run (standalone / embedded in a portal / embedded in an URL iView in a portal), you should use the following to resize your window:
parent.window.resizeTo(1024,768);
(depending on the level of embedding frames, use multiple parent objects)
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.