With the more detailed set of codes available I can now launch into more fully developing the data entry interface. Given this detailed set of codes, an entry interface will have to efficiently allow for the progressive selection of associated events, constructing the appropriate code for submission based on the selections made. As I indicated earlier, I am going to implement such a selection mechanism through a series of select boxes that are, at least after the first box, dynamically filled with the options pertinent to the choice made in the preceding box. Again, I could do that on the server, but sending a request to the server at every step in this process would add a noticeable pause at each of the steps, leading to some degree of user frustration. As the logic to implement this mechanism will therefore have to be on the client, this means that I am going to be getting far more deeply into javascript that I have previously.
As this is by far the most extensive foray into javascript I have made, I am not going to jump straight into a chapter describing the end product, but will rather use a series of smaller chapters describing the gradual integration of the components that will make up the page. As a result, the samples file for each chapter wil be focussed on the changes being made at that specific point, which should allow the enterprising reader the opportunity to make changes of their own, just to see what happens. Remember, however, that in each of these steps the application will be in a somewhat disjunct state. The early stages will not as yet have implemented the new set of code values, and ever after the full interface has been developed and the server logic to process the submitted data has been implemented, some level of modification of the edit page will be required before that component will work. In short, in these versions nothing beyond the path to the specific item being discussed is guaranteed to work.
That being said, onward. In the first sub-chapter here I will develop a mechanism for populating a select box based on the selections in another select box, and in the sub-chapter following I will extend that mechanism to the interface represented by the page as a whole. Once that is in place I will look at additional elements required on the page, and appropriate extensions to the client-side logic to provide a level of automation at that end. Finally, I will implement the server logic required both to process the submissions from the new page and to maintain the state information required to use the interface to record the occurrences in an inning.