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     [CASE-OPENED] tab control, onclick and focus

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] tab control, onclick and focus
 Login/Join
 
Member
posted
I have added a tab control to one of our launch pages because we need the space. It appears to me there is no click event for the tab controls. It seems to faciliate the design of the onclick(), meaning call and function stub are generated, but no onlick is actually fired. Also, I was hoping to be able to programmatically changes tabs based upon certain validation logic.

Enlightement or hope greatly appreciated! Thanks, Tom.

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


WebFOCUS 7.6.8
wINDOWS
aLL
 
Posts: 17 | Location: Des Moines, Iowa | Registered: April 29, 2009Report This Post
Member
posted Hide Post
quote:
Originally posted by thawby:
I have added a tab control to one of our launch pages because we need the space. It appears to me there is no click event for the tab controls. It seems to faciliate the design of the onclick(), meaning call and function stub are generated, but no onlick is actually fired.

Enlightement or hope greatly appreciated! Thanks, Tom.


WebFOCUS 7.6.8
wINDOWS
aLL
 
Posts: 17 | Location: Des Moines, Iowa | Registered: April 29, 2009Report This Post
Virtuoso
posted Hide Post
Enlightenment.

Internally the tab you created is overlaid (by ibirls3.js) with a non-identifiable span tag. However any event placed on the tab is not transferred with it. You will find an area of 4px on the outer edges of the tab that do have the event.

I opened a case for this a while back now, but apart from a kluge to the js file, nothing else has come through. It might be worth opening a case to help get this oversight corrected.

Hope:
You have 3 options.

1. Change the function addDummyElement in ibirls3.js to add an id so you can manually add an onClick event to the id in the on load area. (Safest Approach)
function addDummyElement(ctrl, tabLocation)
{
   var dummy = document.createElement("SPAN");
   if(dummy)
   {
       var loc = getBoundingClientRect(ctrl);
// add id to the dummy span 
       dummy.id = ctrl.id + “_dummy”;
 
       dummy.style.top = 0;
       dummy.style.left = 4;
       dummy.style.height = "100%";
       dummy.style.width = loc.right - loc.left - 8;
       dummy.style.position = "absolute";
       dummy.style.backgroundColor = ctrl.style.backgroundColor;
       dummy.style.backgroundImage = ctrl.style.backgroundImage;
       ctrl.style.backgroundImage = "";
       dummy.style.backgroundRepeat = ctrl.style.backgroundRepeat;
       ctrl.style.backgroundImage = "";
       if(tabLocation == g_szAttrib_Position_Right)
       {
           dummy.style.left = 0;
           dummy.style.width = loc.right - loc.left - 4;
           dummy.style.top = 4;
           dummy.style.height = loc.bottom - loc.top - 8
       }
             
       var text = ctrl.innerText;
       ctrl.innerText = "";
      
       dummy.innerText = text;
       CopyNonInheritedStyles(ctrl, dummy);
       ctrl.appendChild(dummy);
   }
   return dummy;
}

2. Change the function addDummyElement in ibirls3.js to place the defined onClick event onto the dummy span.(Easiest approach)
function addDummyElement(ctrl, tabLocation)
{
   var dummy = document.createElement("SPAN");
   if(dummy)
   {
       var loc = getBoundingClientRect(ctrl);
 
// Add onclick event to dummy span if it exists
 
                if (ctrl.getAttribute("onclick")) {
                                var eventC = ctrl.getAttributeNode("onclick").nodeValue;
                                var evType = 'click';
                                if (dummy.addEventListener){
                                   dummy.addEventListener(evType,function() {eval(eventC)}, true);
                                   dummy.style.cursor = 'pointer';
                                } else {
                                   var r = dummy.attachEvent("on"+evType, function() {eval(eventC)});
                                   dummy.style.cursor = 'pointer';
                                }
                }
 
//  End Addition...
 
       dummy.style.top = 0;
       dummy.style.left = 4;
       dummy.style.height = "100%";
       dummy.style.width = loc.right - loc.left - 8;
       dummy.style.position = "absolute";
       dummy.style.backgroundColor = ctrl.style.backgroundColor;
       dummy.style.backgroundImage = ctrl.style.backgroundImage;
       ctrl.style.backgroundImage = "";
       dummy.style.backgroundRepeat = ctrl.style.backgroundRepeat;
       ctrl.style.backgroundImage = "";
       if(tabLocation == g_szAttrib_Position_Right)
       {
           dummy.style.left = 0;
           dummy.style.width = loc.right - loc.left - 4;
           dummy.style.top = 4;
           dummy.style.height = loc.bottom - loc.top - 8
       }
              
       var text = ctrl.innerText;
       ctrl.innerText = "";
       
       dummy.innerText = text;
       CopyNonInheritedStyles(ctrl, dummy);
       ctrl.appendChild(dummy);
   }
   return dummy;
}

3. Is the way I eventually got it to work as I did not want to change a core js file. But it is such a bad way of working that I cannot tell you here.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Alan, thank you very much for the enlightenment. I will open up a case; in our environment, I do not have access to this ibi*.js files (without having to justify access, etc). Your insight is greatly appreciated. th.


WebFOCUS 7.6.8
wINDOWS
aLL
 
Posts: 17 | Location: Des Moines, Iowa | Registered: April 29, 2009Report 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     [CASE-OPENED] tab control, onclick and focus

Copyright © 1996-2020 Information Builders