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     [CLOSED] Javascript parameter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Javascript parameter
 Login/Join
 
Platinum Member
posted
Hello,
I have an outside application that I'm calling my URL (dashboard). I want to pass in my initials within the URL.

From there I want my html file to read my passed in initials and populate my reports.

I'm having an issue of the fex/html file reading my passed in initials parameter.

my fex file:

 TABLE FILE MDGETMETRICSDASHBOARDGROUPDEV
BY  LOWEST MDGETMETRICSDASHBOARDGROUPDEV.ANSWERSET1.GROUPORDER NOPRINT
BY  LOWEST MDGETMETRICSDASHBOARDGROUPDEV.ANSWERSET1.FLEETID
WHERE ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@INITIALS EQ '&X' ) AND ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@DEFAULTDASH EQ 'fleet' );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENblue_theme.sty,
$
ENDSTYLE
END 



my embedded javascript code in my html file: --currently i have my initials KJT hard coded but I need to get the passed in initials instead.

 if(typeof(bRuntime) != 'undefined') {
// TODO: Add your inline runtime code here
}
//Begin function window_onload
function window_onload(){
UpdateData();

//document.getElementById('edit1').value = "!IBI.AMP.FOCSECUSER;";
document.getElementById('edit1').value = "KJT";
document.getElementById('button1').click();
document.getElementById('edit1').style.display = "none";
document.getElementById('report1').style.display = "none";
document.getElementById('button1').style.display = "none";
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload

function refreshReports(){
var name = this.window.name;
  parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());
  parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF , name); 


my url:

...FleetDashboard?INITIALS=KJT

This message has been edited. Last edited by: FP Mod Chuck,


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Gold member
posted Hide Post
did you try to populate the initial's to a text box in the dashboard/html rather passing it to the fex directly which is inside the html.


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: January 23, 2018Report This Post
Platinum Member
posted Hide Post
no.

how do I pass the initials from my url call directly to the dashboard?

i tried:
function window_onload(initials)(){
updatedata();
document.getElementsById('edit1').value = initials;  


but that didn't work either.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Virtuoso
posted Hide Post
Since you're already using an amper-variable in your HTML, logic dictates that your other parameters are available by the same means.

You should be able to read your initials from !IBI.AMP.INITIALS;

Another approach would be to dissect the query parameter from the window.location object. See: https://developer.mozilla.org/.../API/Window/location


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
quote:
 WHERE ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@INITIALS EQ '&X' ) AND ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@DEFAULTDASH EQ 'fleet' );

my url:

...FleetDashboard?INITIALS=KJT


Your amper var should be the same that is inthe URL:

  
WHERE ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@INITIALS EQ '&INITIALS' ) AND ( MDGETMETRICSDASHBOARDGROUPDEV.INPUT.@DEFAULTDASH EQ 'fleet' );


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Platinum Member
posted Hide Post
Hello<
The !IBI.AMP.INITIALS didn't work.
Here is what I had for the code:
document.getElementById('edit1').value = "!IBI.AMP.INITIALS;";

I wanted to just put it in the edit box so i could see the value that was getting passed in.
All that would display for me was !IBI.AMP.INITIALS in the text

2) I tried the window.loction.href. However, I'm calling a dashboard URL and the window.location.href is using the location of my html page.

So example the url to my dashboard: 'http://dre/ibi_apps/bip/portal/FleetDashboard?INITIALS=KJT'

But in my html page in the edit box it is displaying the actual location of html file.
http://dre/ibi_apps/run.bip?BI...00000&BIP_rand=76048

This message has been edited. Last edited by: KellyT,


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Virtuoso
posted Hide Post
I don't suppose using document.location behaves any different?

Judging from the missing amper-variable and that edit box your URL is in, it looks like the portal may be combined into one page server-side. If that's true, then the solution depends on whether IBI decided to pass any information in those URL's on to the resulting portal page.

I'm not familiar with the portal, can't help you there...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [CLOSED] Javascript parameter

Copyright © 1996-2020 Information Builders