Advertisement
Guest User

StatusReport

a guest
Oct 2nd, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. form1.#subform[0].drpTeam::initialize - (JavaScript, client)
  2. SupportTypeScript.getTeam(this);
  3.  
  4. form1.#subform[0].drpTeam::change - (JavaScript, client)
  5. SupportTypeScript.getSupportTypeOther(xfa, xfa.resolveNode("form1.#subform.Table1.Operation.Row1.drpSupportType[*]"));
  6.  
  7. I created a variable called SupportTypeScript I have an array set up...about 2 pages
  8. 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() );
  9.  
  10. function getTeam(dropdownField)
  11. {
  12. dropdownField.clearItems();
  13. for (var i=0; i < myTeam.length; i++)
  14.  dropdownField.addItem(myTeam[i][0]);
  15. }
  16.  
  17. function getSupportType(TeamField, dropdownField)
  18. {
  19.  dropdownField.clearItems();  //Clears the items of the drop down list.
  20.  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.
  21.   if(myTeam[i][0] == TeamField.rawValue) //Check to see if they match.
  22.   {
  23.    for (var j=i; j < myTeam[i].length; j++) //When they match, add the Support Types to the drop-down list.
  24.    {
  25.     dropdownField.addItem(myTeam[i][j]);
  26.    }
  27.    dropdownField.rawValue = myTeam[i][1];  //Display the first item in the list.
  28.   }
  29. }
  30.  
  31. function getSupportTypeOther(myXfa, dropdownField)
  32. {
  33.  dropdownField.clearItems(); //Clear the items of the drop-down list.
  34.  for (var i=0; i < myTeam.length; i++) // Look through all the Teams until we find the one that matches the team selected.
  35.   if(myTeam[i][0] == myXfa.event.newText) //Check to see if they match. Note: we have to use the event.newText in this case
  36.   // because the change hasn't been committed yet.
  37.   {
  38.    for (var j=1; j < myTeam[i].length; j++) //When they match, add the Support Type to the drop-down list.
  39.     {
  40.     dropdownField.addItem(myTeam[i][j]);
  41.     }
  42.    dropdownField.rawValue = myTeam[i][1];  //Display the first item in the list.
  43.   }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement