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     [SOLVED] Calendar icon and onclick event

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calendar icon and onclick event
 Login/Join
 
Platinum Member
posted
Has anyone figured out how to code an 'onclick' event for the calendar icon? A report I just finished has the option of using a date range or not. Simple solution, a check box and two calendar controls. If the check box is checked, use the dates provided in a WHERE clause, if not don't.

I can use an onclick event to check the checkbox if the use types in a date, but now the user wants that check box to be checked if they click on the icon. Obviously the onchange event does not work because that only applies to manual changes of the value in the text box portion of the calendar control.

This client has WebFOCUS 7.6.10.

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


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report This Post
Platinum Member
posted Hide Post
Im having the same issue with 7703 keep us posted


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Virtuoso
posted Hide Post
Avoid confusing/tempting the user -- Hide the date-range controls until/unless the user selects the 'date-range' radio button.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
How about using a SET commands and avoid the date filter in your FEX file based on whether there are values or not? That will avoid your check box totally.

This message has been edited. Last edited by: Rao D,


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

 
Posts: 104 | Location: Indianapolis | Registered: November 08, 2007Report This Post
Platinum Member
posted Hide Post
Rao: your soulution would definitely be the preferred one. I have been thinking along theose lines but was not sure where to start

I started with this

-DEFAULT &B_DATE = '';
-DEFAULT &E_DATE = '';
-*-SET &B_DATE = '20050101';
-*-SET &E_DATE = '20200101';

but the -SET did not seem effective and thats why I have them commented out

below is my where

WHERE ( AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.APPLICATION_STATUS_DATE GE '&B_DATE' ) AND ( AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.APPLICATION_STATUS_DATE LE '&E_DATE' );


any information you could add would be greatly appreciated


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Gold member
posted Hide Post
Would the following work for you?

If the B & E Dates are not passed from the page the default is blank & gets caught in the goto statement.


-DEFAULT &B_DATE = '';
-DEFAULT &E_DATE = '';

-if &b_date eq '' goto nowhere;

WHERE ( AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.APPLICATION_STATUS_DATE GE '&B_DATE' ) AND ( AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.APPLICATION_STATUS_DATE LE '&E_DATE' );

-nowhere


81.05 All formats
 
Posts: 56 | Location: Manchester | Registered: November 21, 2006Report This Post
Platinum Member
posted Hide Post
thanks PBax thts the result I was looking for


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Platinum Member
posted Hide Post
Unfortunately, the end user rejected this solution out of hand. I had defaulted the From and To dates using java script to cover the last calendar year, put code in the fex to test the dates passed and, if they had been changed,
apply the dates to the where, otherwise ignore them.

Still looking for a way to capture the fact that the calendar control has been used, i.e. a 'onclick' event, so I can use java script to check a checkbox.

Ya gotta love picky users :-)


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report This Post
Virtuoso
posted Hide Post
Are you referring to a calendar control generated by the WF HTML Composter? For such controls there is an Events tab in the Properties box, which does offer an onclick event option. When I click on the "create event" button for onclick, it inserts this JavaScript code in the HTML:

//Begin function calendar1_onclick
function calendar1_onclick(ctrl) {

}


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by rfbowley:
...
Still looking for a way to capture the fact that the calendar control has been used, i.e. a 'onclick' event, so I can use java script to check a checkbox.


Why complicate your life? Have the user control the checkbox, and have the report behave accordingly: If checked, validate and apply whatever the date text-boxes contain (whether the user altered them or left them at their default values) to define the selected date-range. If unchecked, have the fex ignore the date-range.

If desired, you can easily make the visibility of the calendar controls hinge on the state of the checkbox. That will affect both the text-box controls and the associated calendar icons.

It would be nice if you could dynamically disable and grey-out the calendar controls, but my experience was the calenar icon would still pop-up and function.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
Dan, that onclick event only applies to the text box portion of the calendar control, not the icon, If you try this :

 
//Begin function calendar1_onclick
function calendar1_onclick(ctrl) {
alert("clicked")
}

you will see what I mean. Click on the text box, the alert triggers, but you can change the contents with the calendar icon to your heart's content and never see the alert. FYI, the same is true for an onchange. If the user clicks into the box, manually changes the date (bad idea to allow this in my opinion, unless you really like trying to figure out what date the user meant with 01/05/06) the alert will appear. It does not appear when the value is programatically changed via the icon.

FORTUNATELY, the end user finally agreed to "live with" j.gross's suggestion, which is what I had coded in the first place. Big Grin

Rumor has it that Version 8 solves this, so for 7.6.10, this is closed


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report 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     [SOLVED] Calendar icon and onclick event

Copyright © 1996-2020 Information Builders