!--a11y-->
Defining Event Handlers for the Results List 
Use
Just like for the list of authors, only the event handler OnInitialization is needed for the results list,
results.htm (see also Event Handlers for the List of Authors ). The content of OnInitialization is set when the page is called, so no user action is required.The initialization involves the following:
Procedure
|
if authorfname is not initial or authorlname is not initial. translate authorfname to upper case. translate authorlname to upper case. else. authorfname = '%'. endif.
select a~authlname a~authlnam a~authfname a~authfnam a~isbn b~title from ( bsauthors as a inner join bsbook as b on a~isbn = b~isbn ) into corresponding fields of table books where a~authlname like authorlname or a~authfname like authorfname order by a~authlname a~authfname a~isbn. |
First the system checks whether one of the input fields is empty. If one is empty, it is filled with a wildcard, so that a result is also displayed, if the user only specifies the first or last name of an author.
The user data is then converted to upper case, as the entries in the fields
authfname and authlname are in upper case in the bsauthor table.The
select statement comes next: The entries for the first and last names, ISBN and title are displayed in an index, whereby both bsauthors and bsbook tables are combined together through an inner join so that only the entries with the same ISBNs are compared.
Now you have to define the page attributes.