About AddTitles.asp

Using a three-page form called the Admin Wizard, the AddTitles.asp file gathers information about new titles from an administrator and writes this information to the appropriate tables in the FmLib database.

These are the most important elements on the Add/Edit Title page:

Data Flow for Adding Titles and Items

The following diagram shows how an administrator, using a browser, adds titles and items to their respective tables in the FmLib database.

The Details, Authors, and Subjects boxes in this diagram represent pages 1, 2, and 3 of the Admin Wizard, and are presented as <DIV> tags on the screen (see Using <DIV> Tags in the CML). The RDS box indicates the RDS control (an ActiveX object) running independently of ASP. The IFrame boxes indicate the IFrames (HTML intrinsics) that are used within each of the two ASP pages.

The four steps shown in this diagram are described here:

  1. When the AddTitles.asp page is first displayed, the administrator sees the first page of the Admin Wizard. The first page is for entering title information. The administrator enters the title data and clicks a button to move to the second page to enter author data. If you are editing an existing record, you will see a multiselect list box containing all the authors assigned to the title. (The same is true for subjects on the third page.)
  2. If it is necessary to add an author, clicking the Add button sends information to the ifControl IFrame. The IFrame, through addAuthors.asp, sends the author data through ADO to SQL Server. (This step also applies for subjects on the third page of the Admin Wizard, using addSubjects.asp.)
  3. If the author is not already in the database, SQL Server adds the author record and sends back the client-side script that adds the author name to the list of authors already being displayed. (This step also applies for subjects on the third page of the Admin Wizard.)
  4. After adding authors and subjects, the administrator submits the Admin Wizard form. When the form is submitted (from script), AddNewTitle.asp is invoked to add the title, and associate authors and subjects to it.

Note  Clicking the Finish button causes the client to perform validation of data entered into the form. For now, all form fields must contain valid information. However, since some of the fields may not be required for all types of library items, it may be necessary to remove some validation code or adjust it to suit the needs of the library. Refer to the SubmitForm subroutine in AddTitles.asp to make these customizations.

After submitting the title information, the form moves from AddTitles.asp to AddItems.asp. AddItems.asp displays all of the items assigned to this title in this list. Similarly, adding a title to this list is done through the IFrame. The IFrame location is changed and the SQL Server record is created before you actually see the edit page.

You can also edit individual items by double-clicking them from this list. When you do so, the page changes to the edit page. The record contents are displayed through RDS and bound to fields in the form. The Add/Edit Title page is a single form and is viewed as separate windows in the Admin Wizard, whereas the edit page is a separate form.

It is not necessary to add items after you add a title. However, titles without items cannot be requested or checked out. (The CML application will filter requests from the Submit Request screen if there are no items for a title.)

About Adding Authors and Subjects

Adding a record to the author or subject table does not add a new title. It only makes available a new author or subject that you can assign to titles.

Authors and subjects must be assigned for the sake of referential integrity in the database. Authors and subjects need to exist before you can add a title record that references them. They have primary keys associated with them, and are foreign keys in the titleauth and titlesubj tables. The title has a foreign key relationship with both of these tables, which means that the record must exist before you can add a details record (title).