1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

IMAGE imgs/tonge05.gif

Figure3. HTML Page Heirarchy for VChemLab

The heirarchical HTML page structure of VChemLab is shown in Figure 3, indicating how all information flow and display is controlled viathe associated JavaScript object heirarchy which has been built into the HTML pages. When the top search level of VChemLab is accessed, then the whole of the JavaScript molecule data array is downloaded from the server to the client and is made available to the SEARCH function frame. This function allows the user to set up queries based on simple string searches - so that a subset of the arrays may be created based, for example, on project area, chemical name or some toxicological property. Those entries satisfying the search criteria are flagged and this information is then passed over to a set of hidden form elements declared in HTML in the adjacent ARRAYS frame :

<FORM NAME="MolOnOff">

<INPUT TYPE="HIDDEN" NAME="Mol0" VALUE=0>
<INPUT TYPE="HIDDEN" NAME="Mol1" VALUE=0>
<INPUT TYPE="HIDDEN" NAME="Mol2" VALUE=0>....

</FORM>

switching the value of these elements from 0 to 1 if a hit is found (Fig.4).

function checkProject(chosenProject) {

for (ii=0; ii<numMols; ii++) {
if (chosenProject == Mol[ii].Project) {
parent.frames['ARRAYS'].document.MolOnOff.elements[ii].value = 1;
}
}
}
Figure4. JavaScript code in SEARCH frame for switching hidden element values in the
adjacent ARRAYS frame.