Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] App Studio - Resize & Center HTML Page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] App Studio - Resize & Center HTML Page
 Login/Join
 
Master
posted
You can make an HTML page resize and center on your screen by using App Studio and some JavaScript.

In App Studio, go to the "Embedded JavaScript/CSS" tab, and add the following six lines you see under "function window_onload() {":

//Begin function window_onload
function window_onload() {

var windowWidth = 530;
var windowHeight = 660;
var xPos = (screen.width/2) - (windowWidth/2);
var yPos = (screen.height/2) - (windowHeight/2);
window.moveTo(xPos, yPos);
window.resizeTo(windowWidth, windowHeight);

UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload


You will need to adjust the window width & height lines of code to match your HTML page size. This works when your HTML page is run after signing in to the WebFOCUS BI portal.

I did not find anything like this searching this forum, so I thought I'd post this in the hope that it will be useful to others.

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Silver Member
posted Hide Post
Hi Squatch

Try the following:

var scrWidth=screen.width;
var grpbxWidth = document.getElementById('groupbox1').offsetWidth;
var setWidth = ((scrWidth - grpbxWidth)/2);
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
document.getElementById('groupbox1').style.left = setWidth + "px";

You will want to modify this code for your own purposes.

Thanks Barry


WebFOCUS 8
Windows, All Outputs
 
Posts: 34 | Registered: September 08, 2015Report This Post
Gold member
posted Hide Post
I've used similar code in my HTML forms to get them to take up most of the screen. You can also use this in fex files at the end to get them to run full-screen as well.

I subtracted 40 pixels off the height to account for the taskbar on most machines. Just another thought.

-HTMLFORM BEGIN


<script language="JavaScript">
window.moveTo(0, 0);
window.resizeTo(screen.width - 1, screen.height - 40)



-HTMLFORM END


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel
 
Posts: 83 | Registered: April 13, 2015Report This Post
Master
posted Hide Post
Thanks Barry and capples, I'll file your suggestions for future use!


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] App Studio - Resize & Center HTML Page

Copyright © 1996-2020 Information Builders