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.
We have the option Current/Start date in Calendar Properties checked off in our reports. When the report htm page is open, this defaults the date to todays date. The issue is when users click Reset button, it just clears the date, it doesnt reset with todays date. It would be nice if it did and maybe it is a bug, but I have tried to fix this by adding javascript to populate the calendar text with todays date on Reset. I want this to work on one click, but it makes me double click Reset button to populate todays date with the javascript. How do I get this to work with a single click? Here is the javascript Im using that works when double clicking:
//Begin function cmdReset_onclick function cmdReset_onclick(ctrl) { var d = new Date().toJSON().slice(0, 10).split('-'); document.getElementById("txtStartDate").value = d[1] +'/'+ d[2] +'/'+ d[0]; // mm/dd/yyyy document.getElementById("txtEndDate").value = d[1] +'/'+ d[2] +'/'+ d[0]; // mm/dd/yyyy } //End function cmdReset_onclick
If this is a HTML Composer designed page, I *think* if you have a onInitialUpdate() function that sets the date, then the Reset should reset the page and run the onInitialUpdate() function. Try adding your cmdReset_onclick function to onInitialUpdate()...
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 you add a function to a control by point-and-click in Dev Studio HTML Composer, it will add (ctrl) so that the JavaScript can reference the control - within the function you can then reference the control using ctrl - you don't need to reference the control via it's ID or name, but I tend to always use the control ID.
I think this is the explanation!
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
Here is my new issue with Reset button. The javascript i added works in resetting the calendar fields to todays date, but in a drill down it is not pulling in the dates from the first report htm page, it is setting the drill down htm to todays date too. I assume because the js is in the onInitialUpdate. Is there a way to get the Reset button to work just like pressing F5 on the keyboard works? in other words, is there javascript to mimic pressing F5?
Here is what I'm normally do : 1- Add the reset button as the Composer create it 2- Add an onclick event to the Reset button 3- Create a function with:
//To Reset calendar
function resetCalendar(){
var d = new Date().toJSON().slice(0, 10).split('-');
document.getElementById("txtStartDate").value = d[1] +'/'+ d[2] +'/'+ d[0]; // mm/dd/yyyy
document.getElementById("txtEndDate").value = d[1] +'/'+ d[2] +'/'+ d[0]; // mm/dd/yyyy
}
4- call the above in the onInitialUpdate() and in cmdReset_onclick(ctrl) functions.
This way you will let the reset button do its "normal" job plus the calendar reset.
I just add in the reset what it does not do as I wish. I think it should work.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013