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.
Not sure if I can do this, but I have a tree control that I want to change one of the properties via JS.
selectallchildren="yes"
Based on an "OnChange" event, I want to either set this to yes or no. I know I can get other properties like TOP and LEFT, but I question if I can get this particular one and be able to set it.This message has been edited. Last edited by: MattC,
Are you using plain JS or jQuery? Either way how are you accessing the other attributes as it will give me an idea on how best to advise you using a method that you already may know.
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, 2004
Thanks Tony for the response. I started working on alternate solution, by adding in additional Tree control and toggling on/off based on selection, but I would prefer not to do it this way if I can control the property.
I am just using plain JS. For example, here is a panel that I am adjusting position for
var FiltPanl = window.document.getElementById("Filter_Panel");
Based on an IF condition
FiltPanl.style.top = "1870px" ;
I am not really sure how to access these other properties.
Ok, you are accessing the top attribute using .style and plain JS. If you are happy to go with jQuery then you may be able to access the other attributes using something like the snippet below. As you are on 8.0.08 the jQuery libraries will be included in your composer file.
I have not really used jQuery before. My HTML was built in 7 so I don't see any references to the libraries. I tried to add them but my page just blows up.
By chance would you happen to have an example of how to reference the libraries?
If you have your HTML built from 7 then you need to be very careful (as Francis will no doubt attest!). I also assumed (perhaps wrongly) use of App Studio over Dev Studio
I did post a code sample a short while ago that allowed you to pull the jQuery libraries direct from your embedded JS (DS 8.n doesn't load jQuery by default) and this code may work for you without having to open your code in edit? Can't locate it at present though
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, 2004
I did post a code sample a short while ago that allowed you to pull the jQuery libraries direct from your embedded JS
Apologies, I was otherwise occupied yesterday, but I still haven't been able to locate the code that I thought (am fairly sure?) that I posted. So just in case, I'll post it here. You never know, it may help someone else looking at the thread in future.
Just drop this code into the "Embedded Javascript" within HTML Composer and it will add the jQuery library within the "Head" section of your HTML file on loading. You will then have access to the jQuery library straight away.
Don't forget that you would not require this within HTML Composer using App Studio.
This code adds a jQuery document ready function to prove that it works and is only for demonstration purposes.
//Begin function window_onload
function window_onload() {
loadjQuery();
UpdateData();
$(document).ready(function() {
alert("Hello World");
});
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
function loadjQuery() {
var element = document.createElement('script');
element.async = false;
element.src = '/ibi_apps/ibi_html/javaassist/jquery/jquery_min.js';
element.type = 'text/javascript';
(document.getElementsByTagName('head')[0]||document.body).appendChild(element);
}
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, 2004
I found that function except for calling Google's libraries.
I just don't think it works for a Tree Control. Tree Controls are a beast.
I had a requirement to provide basically the same tree control, but based on selection they wanted to toggle off the selecting all children. I ended up adding an additional tree control and just toggling the show/hide.
This particular HTML I am working on is a beast itself. Makes me nervous when I have to go under the covers to add something. I am always fearful that any slight change will break something.
I'm sure that your question was rhetorical and I'm not quite sure of the reason for you posing it - although I can guess
Just for other members, because you know already, the version will be one that was installed (if any) with your version of WF8 (unless your site has overwritten it of course) but the URL could easily be the path reference to the version that you want.
You'll probably now ask why did I code for one installed with WF? The answer is that some installations are not exposed to the internet and would therefore be unable to reference one outside of their installation. But then you knew that!
For Matt,
Not a dumb question at all! I think that Francis is just trying to imply that the version shipped with WF is an older version and not the latest with extra functionality, but then he would realise that you have to ship with a version. Personally I would use one that provided the functionality needed for the task in hand. It is nice sometimes to use some of the latest functionality, but for simple control disabling, value changing, combo list manipulation etc. why do I need to put the latest version in when a basic version will suffice?
I wouldn't put a 4.2 litre Jaguar V12 engine in a Ford model T because I wouldn't be able to utilise everything that the V12 could give
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, 2004