Up: Equation Input Control Documentation

Using the WebEQ Equation Input Control on a Mac

In the current Netscape 4.x and Internet Explorer 5.x browsers on the Macintosh, JavaScript cannot be used to query Java applets. Thus, another method is required for sending user input from the Equation Input applet back to the server. In addition, special steps must be taken to make a current version Java available to Netscape, in order for the Equation Input Control to run successfully, since the native version of Java in Netscape is now antiquated.

Communicating with the Server

When running on a Macintosh, the Equation Input Control user interface adds a "Title" input field and a "Submit" button at the bottom of the editor panel. When the user clicks the Submit button, the applet makes an HTTP request back to the server with the MathML markup for the current equation, and the value of the Title input field appended as CGI arguments.

The URL that the applet calls is specified as a parameter in the applet tags that invoke the Equation Input Control. Additionally, one can set the initial value of the Title input field with a parameter. The Title field is provided for associating a name with the equation, since that is a common requirement in Web applications using the Equation Input Control.

Typically, the URL passed into the Equation Input Control with be a CGI script of some sort. If this URL already has some CGI arguments appended, the Equation Input Control will append the MathML and title as additional arguments using '&' as the initial separator character. Otherwise, the Equation Input Control will append the MathML and title as arguments, using '?' as the initial separator character:

Examples:

URL parameter: http://www.myhost.edu/myscript.cgi
Final URL request:  http://www.myhost.edu/myscript.cgi?eq=...&title=...
 
URL parameter: http://www.myhost.edu/myscript.cgi?userid=23
Final URL request:  http://www.myhost.edu/myscript.cgi?userid=23&eq=...&title=...

Also, the Equation Input Control automatically escapes all special characters in the MathML and title values, so that the resulting URL is guaranteed to be well-formed if the original URL being passed in is well-formed.

Upgrading Java in Netscape

The WebEQ Equation Input Control requires Java 1.1 and by default, Netscape only provides Java 1.0.2 implementations of key user interface components. However, Netscape and Sun have worked together to provide a method of upgrading the Netscape Java implementation.

The upgrade consists of two parts.

  1. Users must first install a current version of Java. This is accomplished by downloading the Macintosh Java runtime (MRJ 2.1) from Apple's Java Web site.

  2. Users must then install a special Java plugin from Netscape which instructs the browser to user the MRJ 2.1. Download the plugin from mozilla.org.

To instruct the browser to use the plugin, it is necessary to use a special <EMBED> tag instead of the usual <:applet> tag to invoke the Equation Input Control in a Web page. A typical usage looks like this:

<embed
 type="application/x-java-vm" 
 code="webeq.editor.PopUp" height=300 width=600
 pluginspage="http://www.mozilla.org/oji/"
 url="http://www.myhost.edu/myscript.cgi"
 title="Enter equation name here"
>
Consult the Mozilla MRJ Plugin documentation for full details.


[HOME] WebEQ 2.5 Documentation Table of Contents

Created: Aug 08 1997 --- Last modified: Sun Sep 10 15:57:45 2000
Copyright © 1997-2000 Design Science, Inc. All rights reserved.