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.
This is difficult to document well. The pieces have to be considered together to make much sense.
When I click on the calendar icon in Viewer the .js has no problem. In IE or Chrome I get: 'Uncaught TypeError: Cannot read property 'parentNode' in the .js line 692
This div with the calendar icon is created on the fly (via a fex and Ajax) and therefore does not exist at the top of the HTML.
Below is the code building the calendar html to be appended to a div via Ajax.
-SET &SEMI=';';
-SET &='&';
-SET &ANCHOR = IF '&PARMNO.EVAL' EQ 'DATE1' THEN 'ANCHOR1' ELSE 'ANCHOR2';
-SET &CLNM= IF '&PARMNO.EVAL' EQ 'DATE1' THEN ' onClick="javascript:clickdt1();"'
- ELSE ' onClick="javascript:clickdt2();"' ;
-SET &DTNM=IF '&PARMNO.EVAL' EQ 'DATE1' THEN 'date1' ELSE 'date2';
-SET &PATTERN='MM/dd/yyyy';
-SET &QT='''';
-SET &SEMI=';';
-SET &CLICKX = IF '&PARMNO.EVAL' EQ 'DATE1' THEN
- 'onClick="cal1x.select(&PARMNO,&QT&ANCHOR&QT,&QT&PATTERN&QT); return false;" '
- ELSE
- 'onClick="cal2x.select(&PARMNO,&QT&ANCHOR&QT,&QT&PATTERN&QT); return false;" ';
-* This is the first Date Select
DEFINE FILE xxxxxxxxx
CNTR/I5 WITH REPORTNAME=CNTR+ 1;
HLINE/A1000 WITH REPORTNAME=
'<html><head> '|
' <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> '|
'</head><body>'|
' <TABLE border cellpadding=1 class="selwidth" ><TR align=right><TD>'|
' &PARMLBL.EVAL '|'&'|'nbsp'|
'<input type="text" name="&DTNM" id="&DTNM" '|
' maxlength="10" size="12">'|
'<A HREF="#" style="color:red"; '|
' &CLNM ' |
' NAME="&ANCHOR" ID="&ANCHOR"> '|
'<img src="/approot/baseapp/calendar-icon16.png" style="background-color: #684dff";>'|
'</a>'|
'</TD></TR></TABLE>' |
'</body></html>';
END
TABLEF FILE xxxxxxxx
PRINT HLINE AS ''
IF READLIMIT IS 1
ON TABLE PCHOLD
END
-RUN
else if (this.use_gebi && e) {
var t = e.originalTarget;
line 692---->>>>>>> while (t.parentNode != null) {
if (t.id==this.divName) {
return true;
}
t = t.parentNode;
}
return false;
}
In the entire .js these are the only references to t.parentNode. I am tempted to simply remove them and simply always return true.
Below is the setup to invoke the .js functionality in head section of main html.
This is the function used when the calendar icon is clicked. Note that 'function.call' is used to make the function act as if it was invoked from inside the div. Required because the .js uses 'this' notation.
function clickdt1(){
var doit1="cal1x.select(date1,'ANCHOR1','MM/dd/yyyy'); return false;"
var tmpFunc1= new Function(doit1);
myobj1=document.getElementById(ANCHOR1);
tmpFunc1.call(myobj1,date1,'ANCHOR1','MM/dd/yyyy');
}
Clear as mud? I would like to include the actual calendar 'view source code', but the created div is not in the 'source code'. ideas?
NealThis message has been edited. Last edited by: <Emily McAllister>,
Neal, since you're doing a lot of stuff manually, I suggest using jQuery and jQuery UI - you then do not have to rely on WF JavaScript, and the jQuery UI Calendar control is way smarter than the WF one.This message has been edited. Last edited by: Francis Mariani,
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
Neal, since you're doing a lot of stuff manually, I suggest using jQuery and jQuery UI - you then do not have to rely on WF JavaScript, and the jQury UI Calendar control is way smarter than the WF one.
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
It's 2015 and I still haven't figured out how to prevent the user from clicking on Saturday and Sunday dates. Also, I haven't figured out how to allow a click on only certain dates in a range... jQuery Calendar can do that and more.
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
When I click on the calendar icon in Viewer the .js has no problem. In IE or Chrome I get: 'Uncaught TypeError: Cannot read property 'parentNode' in the .js line 692
Neal, what version of IE are you using? I've had issues with WF 8.0.08 and IE 11. If you set compatiblity mode on, or use F12 and set the emulation to IE 9 the problems seem to go away...
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