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     Javascript custom listbox

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Javascript custom listbox
 Login/Join
 
Member
posted
I am trying to do two things, here. I have a custom listbox with a set of dates. I also have a dropdown for the month. When the user selects a month I want it to clear the to list and then repopulate it with the new selected data. I built it this way rather then a calendar as it’s a dynamic table that has only the 30 previous business days, and fet it beter to only allow for actual dates with data.

Any help would be great.

Thank you,

Andrew
 //Begin function combobox1_onchange

function combobox1_onchange(ctrl) {

var myControl = document.getElementById('combobox1');
var myControlSelectedText = myControl.options[myControl.selectedIndex].value;
var	myMonth = myControlSelectedText;

// regex to test
var strPatt = new RegExp("^" + myMonth);
     var list = document.getElementById('customselect1_selectfrom');
for(var i = 0; i < list.options.length; ++i)

	{
		if(strPatt.test(list.options[i].text) == true){ 
			list.options[i].selected = true;

		}
	}
}
//End function combobox1_onchange
 


WebFOCUS 7.7.02 Windows, All Outputs
 
Posts: 7 | Registered: April 04, 2011Report This Post
Expert
posted Hide Post
So, my first question is: Why are you using a JS listbox instead of doing it in the HTML Composer?

The HTML Composer has it all (OK, almost everything), including the cascading which you desire.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Member
posted Hide Post
I am using the HTML composer, the select the Month is an optional variable. You can run a set of reports, on a single day, multiple days, between two dates and the whole month. The custom list box is chained to two optional filters, one is a process type and the other is a customer. I can reset the listbox, but just need to move the selected values, that is the missing piece. I am a “beginner” with JS, I have .net background, and have found little help in the ibi docs, so I figured I would ask here.


WebFOCUS 7.7.02 Windows, All Outputs
 
Posts: 7 | Registered: April 04, 2011Report 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     Javascript custom listbox

Copyright © 1996-2020 Information Builders