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 Designer Forum on Focal Point     [SOLVED] Button addEventListener

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Button addEventListener
 Login/Join
 
Guru
posted
I'm trying to add custom buttons to the panel and it works if I open any URLs or reports but, I'd like to pass the parms along with it, for eg., EXL Download for the same report with prms selected. I tried with &PARM=&PARM but no luck

   window.addEventListener("iba_pageloading", function (e){
    var panel = document.querySelector(".custom1").ibaObject;
    var ibsite = panel.addButton({"glyphClasses": "fa fa-question", "class": "ibButton", "tooltip": "Visit IB Site"}, ".pd-container-title-button-resize", true);
    var exl = panel.addButton({"glyphClasses": "fa fa-file-excel-o", "class": "ibButton", "tooltip": "Excel Dowload"}, ".pd-container-title-button-resize", true);
    ibsite.addEventListener("click", function(){
        window.open("http://www.ibi.com");
    });
    exl.addEventListener("click", function(){
        window.open='./wfirs/ibfs/WFC/Repository/COE/USB_Locations/USB_Branch_Report.fex';
    });
});

I think its cool to be able to add any button with fontawesome icons but need to be able to run report with parms on the page.

Thanks!
-P

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


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Expert
posted Hide Post
Is this a composer page ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
This is the new "Page" using Designer, they now have abilities to add CSS and JS when building a page which is pretty cool. Again I'm using 8206 Home page to perform this.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Expert
posted Hide Post
Yes, wasn't sure Designer was in 8.2.05.

You are going to have problems. W are in discussions with IBI to get the parms accessible.

Case open.

It looks promising but seems there is no functions available to retrieve the parms.

If you have the parms shown on the screen, you may be able to use js to collect them, but not sure if the values of select lists are available directly.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Thanks Waz,
I ended up grabbing the var as getelementById value and am able to pass it along in the URL. I'm hoping we'll see more IBComposer type functions exposed for designer.

-P


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Guru
posted Hide Post
This is the updated code just in case
 
window.addEventListener("iba_pageloading", function (e){
    var panel = document.querySelector(".custom1").ibaObject;
    var ibsite = panel.addButton({"glyphClasses": "fa fa-question", "class": "ibButton", "tooltip": "Visit IB Site"}, ".pd-container-title-button-resize", true);
    var exl = panel.addButton({"glyphClasses": "fa fa-file-excel-o", "class": "ibButton", "tooltip": "Excel Dowload"}, ".pd-container-title-button-resize", true);
    ibsite.addEventListener("click", function(){
        window.open("http://www.ibi.com");
    });
    exl.addEventListener("click", function(){
        var p = document.getElementById('ibx-aria-id-64').value;
        console.log(p);
        var url = './wfirs/ibfs/WFC/Repository/COE/USB_Locations/USB_Branch_Report.fex'  ;
        console.log(url);
        url = url + '?ZIPCODE=' + p ;
        url = url + '&FMT=XLSX' ;
        console.log('final url=' + url);
        window.open(url) ;
        
    });
}); 


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS Designer Forum on Focal Point     [SOLVED] Button addEventListener

Copyright © 1996-2020 Information Builders