Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

How can I onclick on a container on a page and open a new page on a new tab?


Sayed Khan
Go to solution Solved by Patrick Huebgen,

Recommended Posts

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 END

Then the container could reference the .fex procedure.

You could use an image instead of an iframe.

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...