Embedding SpellChecker Support for multiple text boxes

Revision 7-30-2002

This document describes how to set SpellChecker to check multiple text boxes using one “Spell Check” button.

Begin by setting up SpellChecker as usual, described in the instructions at http://emedtools.spellchecker.net/support/textbox.html

Next, make the following changes to enable multiple textbox checking:

  1. Download fmch.js and place this file in the web site directory where the file spch.js is located.
  2. Find the following code in your web page:
    <script type="text/javascript" language="javascript" src="http://your_url/spch.js"></script>
    and add the following line after it:
    <script type="text/javascript" language="javascript" src="http://your_url/fmch.js"></script>
    Note: Replace your_url with the actual path to the files referenced.
  3. If you are using the SpellCheck button on your page, change the button code to:
    <INPUT TYPE="BUTTON" VALUE="Spell Check" onclick=" FCH_CheckFormTextControls('INPUTCONTROLNAMESLIST','LANGUAGE', document.location.protocol + '//' + document.location.host + '/CGIBIN/sproxy.cgi');">
    If you are using a link, change the link code to:
    <a href="javascript: FCH_CheckFormTextControls('INPUTCONTROLNAMESLIST', 'LANGUAGE', document.location.protocol + '//' + document.location.host + '/CGIBIN/sproxy.cgi' );">SpellCheck</a>
    Note: LANGUAGE and CGIBIN parameters must be changed, as described in http://emedtools.spellchecker.net/support/getscript.html

    INPUTCONTROLNAMESLIST determines which text box(es) need to be checked and updated. This parameter must be changed to contain a list of all input controls to be checked. Input control names must be separated by commas. If this parameter is empty (equal to ''), all text controls will be checked.

    For example, in the form below, the INPUTCONTROLNAMESLIST parameter should be replaced with 'txt_to,txt_from,ta_message' to check all three text boxes:

    <form action=”/somewhere/somescript.cgi”>
    <input type=text name=”txt_to” size=30><br>
    <input type=text name=”txt_from” size=30><br>
    <textarea name=”ta_message” rows=5 cols=40></textarea><br>
    <input type=submit>
    </form>

Please note, mutliple text boxes feature doesn't support HTML tags, so if you decide to check spelling of HTML document, you will see entire text including hypertext tags.