Sayed Khan Posted April 27, 2023 Share Posted April 27, 2023 I am trying to find a way to onclick on a container on a page which will open a new page on a new tab ?I have put the following code in javascript section of the page but not workingfunction testURL(){window.open("https://www.google.com")} Link to comment Share on other sites More sharing options...
David Beagan Posted April 28, 2023 Share Posted April 28, 2023 What do you want to click on in the container to initiate the new tab? Link to comment Share on other sites More sharing options...
Sayed Khan Posted May 1, 2023 Author Share Posted May 1, 2023 Hi David,Yes, I want to be able to click anywhere on the container to initiate the new tab. Link to comment Share on other sites More sharing options...
Monica Rosa Posted May 1, 2023 Share Posted May 1, 2023 Hey Sayed I believe you opened a case with us and I sent you some sample Javascript code.If this doesnt work please followup under your case.Thanks. Link to comment Share on other sites More sharing options...
David Beagan Posted May 1, 2023 Share Posted May 1, 2023 You could try to put this code in a .fex procedure:-HTMLFORM BEGIN<a href=https://www.google.com target=_new><iframe style="top=0;left=0;height:100%;width:100%;border:none;margin=0;"></iframe></a> -HTMLFORM ENDThen the container could reference the .fex procedure. You could use an image instead of an iframe. Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted May 2, 2023 Share Posted May 2, 2023 Hi @Sayed Khan please check https://docs.tibco.com/pub/wf-wf/9.2.0/doc/pdf/TIB_wf-wf_9.1.1_users_guide.pdf?id=1 Page 752 "Using a JavaScript Drilldown to Run a Chart or Report in a Target Panel on a Page" Patrick Link to comment Share on other sites More sharing options...
Sayed Khan Posted May 2, 2023 Author Share Posted May 2, 2023 window.addEventListener("iba_pageloaded", function (e){ var panel = document.querySelector(".skonclick").ibaObject; // var panel = document.querySelector(".skonclick").ibaContainer; // var tibcosite = panel.addButton({// "glyphClasses": "fa fa-home", "class": "tibcoButton", "tooltip": "Click to display help."}, // ".pd-container-title-button-resize", true); var tibcosite = panel.containers(); tibcosite.addEventListener("click", function(){ window.open(https://server/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_RUN&BIP_folder=IBFS%253A%252FWFC%252FRepository%252Fsayedm5o%252Fcar%252F&BIP_item=car_test_sk);}); var runReport = panel.addMenuItem({ "text": "Country Report", "glyphClasses": "fa fa-globe","class": "globemenu"}, ".skonclick>.ibx_menu_item", true); runReport.addEventListener("click", function(){ window.open( https://server/ibi_apps/run.bip?run.bip?BIP_REQUEST_TYPE=BIP_RUN&BIP_folder=IBFS%253A%252FWFC%252FRepository%252Fsayedm5o%252Fcar%252F&BIP_item=car_test_sk); });});This code seems to get me close to what I'm looking for. It creates a button inside the title portion of the container, when clicked, it opens a new page. What I want is instead of the button being inserted in the title, I want the whole container to be clickable. Link to comment Share on other sites More sharing options...
Solution Patrick Huebgen Posted May 2, 2023 Solution Share Posted May 2, 2023 Did you looked into "Link Tile" instead of a regular container?https://kb.informationbuilders.com/topic/linking-external-content-page-8207 Link to comment Share on other sites More sharing options...
David Beagan Posted May 2, 2023 Share Posted May 2, 2023 Patrick, good one. I just saw that and tried it out. Seems to do exactly what Syed is asking for. Link to comment Share on other sites More sharing options...
Sayed Khan Posted May 2, 2023 Author Share Posted May 2, 2023 Hi Patrick,Thank you so much. That seems to get me 90% there. The only other thing I need is the target to be same page, I want to overwite the current page with a new page. Basically I have a portal with multiple menu tabs on top. Each tab is a page. When clicking on the container, I want a new page to open within the portal leaving the portal logo, menu, etc.. intact. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now