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     Resource layout code not supporting collapsible divs?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Resource layout code not supporting collapsible divs?
 Login/Join
 
Gold member
posted
I've built a form using resource layout 5.3.4 and have added div sections manually that I want to be able to expand and collapse. When setting the style.display attribute to "none" for a div via javascript, the section disappears as expected, but collapsing doesn't occur to move up the following sections. (acts just like visibility:hidden)

I've cut and paste simple examples from the internet that work fine, so I don't think my browser is the problem. Is there something about the html that resource layout creates that prevents this feature from working, or is there something else I should be looking for?
 
Posts: 59 | Location: Minneapolis | Registered: September 01, 2004Report This Post
Expert
posted Hide Post
TGT,

IB have loads of JavaScript modules that are / can be called during the building of the HTML page in the client browser. Most are contained within IBIRLS.js.

One of the main problems that some of us have had is that during the loading, the functions within ibirls.js are called and replace events for certain controls (such as SELECTS). As far as I can tell, this is mainly to allow the chaining of SELECTs etc. but does have the effect of, sometimes, making hand coded stuff non functional.

One thing you could do if your problem is due to a reassignment of an onchange event on a SELECT is to reassign it back after the onload function. However, a cautionary note, make sure your SELECT is not a chained SELECT otherwise it may not function correctly afterwards.

Reassign events something like this in the OnLoad function in your code -

<SCRIPT id=OnloadHandler>
function OnLoad() {
<!--startibilines-->
UpdateData();
<!--endibilines-->
// Overcome a bug in IB's script that clears an onchange event for a select
SelCtrl = document.getElementById('SELECT1');
SelCtrl.attachEvent("onchange", xx_addEvent);
}

function xx_addEvent() {
   this.displayElement = window.event.srcElement;
   your_function_name(parm1,parm2,etc.);
}
</SCRIPT>


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
I stripped all the external script calls out in order to test out of the First Page 2006 html editor. After ensuring that no javascript errors were occurring, I still got the same results. I wonder if the absolute positioning of fields over 2 columns causes the issue, versus placement within tables and rows. I just haven't found anything in googleland or ibiforumland that reflects someone having the same issue.
 
Posts: 59 | Location: Minneapolis | Registered: September 01, 2004Report This Post
Expert
posted Hide Post
TGT,

It depends on what else you have in the style etc.

A basic demo of "collapsing" divs can be seen using this html -
<html>
 <head>
  <title>Collapsing Divs</title>
 </head>
 <body>
  <div id="div1" style="display: block; background:#f0f5ff; color:#ff0000;">
   This is Div 1
  </div>
  <div id="div2" style="display: block; background:#f0f5ff; color:#ff0000;">
   This is Div 2
  </div>
  <a href="javascript:toggle_div('div1');" alt="Toggle Div 1">Show/Hide Div 1</a><br />
  <a href="javascript:toggle_div('div2');" alt="Toggle Div 2">Show/Hide Div 2</a> 
 </body>
 <script language=javascript>
  function toggle_div(obj) {
     var el = document.getElementById(obj);
     el.style.display = (el.style.display != "block") ? "block" : "none";
  }
 </script>
</html>


To be able to help you more I'd need to see more of your code.

T

p.s. Happy Independence Day to all in USA



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Resource layout code not supporting collapsible divs?

Copyright © 1996-2020 Information Builders