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.
In my Launchpage I have a text box for Year,Calendar control for From and Calendar control for To. When the user enters a year in the textbox,the calendar controls should be disabled and when the user enters From or To date the textbox should be disabled.I am able to disable the text box.But I am not able to disable the Calendar controls.I am using the Disabled property of the calendar.only the textbox of the control is getting disabled but not the calendar icon.I am still able to click the calendar icon and select a date.This is not the behaviour I wanted.
The event I am using is onkeyup="toggleFromTo2('edit1', 'calendar1', 'calendar2')"
function toggleFromTo2(yearInput, fromInput, toInput) {
if ((document.getElementById(yearInput).value != "" || document.getElementById(yearInput).value.length > 0)) {
document.getElementById(fromInput).disabled = true;
document.getElementById(toInput).disabled = true;
document.getElementById(fromInput).style.backgroundColor = "gray";
document.getElementById(toInput).style.backgroundColor = "gray";
}
//otherwise enable the From and To fields
else {
document.getElementById(fromInput).disabled = false;
document.getElementById(fromInput).style.backgroundColor = "";
document.getElementById(toInput).disabled = false;
document.getElementById(toInput).style.backgroundColor = "";
}
}
Could someone tell me where I am going wrong.The other issue I am having is when I enter the date in the calendar textbox manually only it disables the year textbox.when I use the calendar icon to select a date it doesnot disable the year textbox.
Am I using the wrong event.Could someone suggest a solution. Thanks.
The other problem I have is when I select a date using the calendar icon,the year textbox doesn't disable.When I enter the date manually in the calendar textbox,the year textbox is disabled.
Here is my code.
function toggleYear(fromInput, toInput, yearInput) {
//if the From or To fields contain anything, disable the year input
if ((document.getElementById(fromInput).value != "" || document.getElementById(fromInput).value.length > 0) ||
(document.getElementById(toInput).value != "" || document.getElementById(toInput).value.length > 0)) {
document.getElementById(yearInput).disabled = true;
document.getElementById(yearInput).style.backgroundColor = "gray";
}
//otherwise enable them
else {
document.getElementById(yearInput).disabled = false;
document.getElementById(yearInput).style.backgroundColor = "";
}
}
In the HTML I have the event onkeyup="toggleYear('calendar22', 'calendar23', 'edit37')" for both the calendars.Should I use someother event? Could someone help.