next up previous contents index
Next: Serving .xws files Up: WAVE and the Web Previous: WAVE and the Web

Controlling WAVE from a web browser

Most web browsers, such as Netscape, can use so-called helper or viewer applications. These are external applications that are invoked by the browser to present data in formats that (usually) are not supported by the browser directly. For example, browsers often use ghostscript to display PostScript data. It is possible to configure Netscape and other web browsers so that WAVE can be used indirectly as a helper application.

By using wavescript as the helper application for viewing DB records, an already-running WAVE process can be made to open a record and an annotation set and to move to a specified location in the record. With this approach, it is not necessary to start a new WAVE process each time.

You can set up your browser to view files with the MIME type application/x-wavescript or suffix .xws using wavescript. To do so, add the line

    type=application/x-wavescript  exts=xws
to the file named .mime.types in your home directory, and add the line
    application/x-wavescript; wavescript %s
to the file named .mailcap (also in your home directory). If your browser is Netscape, you can make these additions to .mime.types and .mailcap by choosing General Preferences from the Options menu, clicking on the Helpers tab, then clicking on the New button. Fill in the dialog box as shown in figure 3.6, then save your settings.

   figure1576
Figure 3.6: Adding wavescript as a Netscape helper.

Once wavescript has been installed as a helper application, your web browser will launch wavescript whenever you click on a link to a .xws script file. As an example, here is a link to the example.xws script shown in the previous section: click here to view waveforms To provide such a link in an HTML document, use a statement such as

   <a href="example.xws">
   <img src="wave.gif" alt="click here to view waveforms"></a>


George B. Moody (george@hstbme.mit.edu)
Wed May 7 20:21:25 EDT 1997