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.
Looking for some help from some WF gurus on how I might be able to get data within an iframe to be dynamically sorted (using referenced .js file) when the column header is clicked. I have the .js file ready. What I am having trouble with is referencing the output that is in the iframe.
I believe i have to "chain" these to make it work. Googling on the web found this snippit but I can't seem to get this to work:
var tables = document.getElementById('iframecontent').getElementsByClassName('sortable');
Any ideas? Has anyone been able to get this to work? Any sample FOCUS code you could share would be much appreciated.This message has been edited. Last edited by: kadkins,
Are you sure your iframe has an id of "iframecontent"? If you're using IE, are you sure getElementsByClassName works in IE? Have you looked at the source of the iframe - do the html elements you want to sort have the class "sortable"?
Perhaps not what you're looking for, this is a quickie WebFOCUS solution to sorting table rows by clicking on column titles:
-*-- sortdemo1.fex - Francis Mariani -------------------------------------------
-SET &ECHO=ALL;
-DEFAULT &SORT = 'COUNTRY';
-DEFAULT &PREVSORT = 'COUNTRY';
-DEFAULT &SORTDIR = 'HIGEST';
-SET &SORTDIR = IF &SORT EQ &PREVSORT AND &SORTDIR EQ 'LOWEST' THEN 'HIGHEST' ELSE 'LOWEST';
-SET &DIRCOLOR = IF &SORTDIR EQ 'LOWEST' THEN 'RED' ELSE 'GREEN';
-*-SET &RNDM = EDIT(HHMMSS('A8'),'99$99$99');
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
SALES
BY &SORTDIR &SORT NOPRINT
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF,FONT='ARIAL', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=TITLE, COLUMN=&SORT(2), COLOR=&DIRCOLOR,$
TYPE=TITLE, COLUMN=P1, FOCEXEC=SORTDEMO1( \
SORT='COUNTRY' \
PREVSORT='&SORT' \
SORTDIR='&SORTDIR' \
-*RNDM=&RNDM \
), $
TYPE=TITLE, COLUMN=P2, FOCEXEC=SORTDEMO1( \
SORT='CAR' \
PREVSORT='&SORT' \
SORTDIR='&SORTDIR' \
-*RNDM=&RNDM \
), $
TYPE=TITLE, COLUMN=P3, FOCEXEC=SORTDEMO1( \
SORT='MODEL' \
PREVSORT='&SORT' \
SORTDIR='&SORTDIR' \
-*RNDM=&RNDM \
), $
TYPE=TITLE, COLUMN=P4, FOCEXEC=SORTDEMO1( \
SORT='SALES' \
PREVSORT='&SORT' \
SORTDIR='&SORTDIR' \
-*RNDM=&RNDM \
), $
ENDSTYLE
END
-RUN
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
"Are you sure your iframe has an id of "iframecontent"?" No, this was generic. I replaced this with my iframe name.
"If you're using IE, are you sure getElementsByClassName works in IE?" Yes, it works.
"Have you looked at the source of the iframe - do the html elements you want to sort have the class "sortable"?" Yes, I added the sortable class to the iframe element
Thanks Francis. This at least got me on the right track.