Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- form1.#subform[0].drpTeam::initialize - (JavaScript, client)
- SupportTypeScript.getTeam(this);
- form1.#subform[0].drpTeam::change - (JavaScript, client)
- SupportTypeScript.getSupportTypeOther(xfa, xfa.resolveNode("form1.#subform.Table1.Operation.Row1.drpSupportType[*]"));
- I created a variable called SupportTypeScript I have an array set up...about 2 pages
- var myTeam = new Array(new Array(15), new Array(12), new Array(15), new Array(17), new Array(10), new Array(12), new Array(2), new Array() );
- function getTeam(dropdownField)
- {
- dropdownField.clearItems();
- for (var i=0; i < myTeam.length; i++)
- dropdownField.addItem(myTeam[i][0]);
- }
- function getSupportType(TeamField, dropdownField)
- {
- dropdownField.clearItems(); //Clears the items of the drop down list.
- for (var i=0; i< myTeam.length; i++) // Look through all of the Teams until we find the one that matches the support type selected.
- if(myTeam[i][0] == TeamField.rawValue) //Check to see if they match.
- {
- for (var j=i; j < myTeam[i].length; j++) //When they match, add the Support Types to the drop-down list.
- {
- dropdownField.addItem(myTeam[i][j]);
- }
- dropdownField.rawValue = myTeam[i][1]; //Display the first item in the list.
- }
- }
- function getSupportTypeOther(myXfa, dropdownField)
- {
- dropdownField.clearItems(); //Clear the items of the drop-down list.
- for (var i=0; i < myTeam.length; i++) // Look through all the Teams until we find the one that matches the team selected.
- if(myTeam[i][0] == myXfa.event.newText) //Check to see if they match. Note: we have to use the event.newText in this case
- // because the change hasn't been committed yet.
- {
- for (var j=1; j < myTeam[i].length; j++) //When they match, add the Support Type to the drop-down list.
- {
- dropdownField.addItem(myTeam[i][j]);
- }
- dropdownField.rawValue = myTeam[i][1]; //Display the first item in the list.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement