Focal Point
[SOLVED] HTML Composer - How to Reset Calendar Control.

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5047090276

August 07, 2014, 06:29 PM
David Briars
[SOLVED] HTML Composer - How to Reset Calendar Control.
I have a button control on my HTML page that resets my combobox and checkboxes with the following code:
//Begin function button2_onclick
function button2_onclick(ctrl) {
 document.getElementById('combobox1').selectedIndex=0;
 document.getElementById('checkbox1_0').checked=true;
 document.getElementById('checkbox3_0').checked=true;
 document.getElementById('checkbox4_0').checked=true;
 document.getElementById('checkbox5_0').checked=true;
 document.getElementById('checkbox6_0').checked=true;
}
//End function button2_onclick 


How can I now reset a calendar control I have on the same page?

I have 'Current/Start date' checked on the 'Properties and Settings' design form, so current date is indeed what I need to have the calendar control be reset to.

This message has been edited. Last edited by: <Kathryn Henning>,




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

August 07, 2014, 10:42 PM
David Briars
OK, I think I have a solution that seems to be working.

In function window_onload() I save off the calendar value:
initialdate = IbComposer_getCurrentSelection('calendar1');  

Then in the reset button function, I reset the calendar value:
//Begin function button1_onclick
function button1_onclick(ctrl) {
 document.getElementById('calendar1').value=initialdate;
}
//End function button1_onclick