Top of page
| Download
the SPROXY.CGI Script File |
The sproxy.cgi script file returns corrected data from the SpellChecker engine to the text-box on your web page.
1.
Download the file "sproxy.cgi". Please login to "My Account" Section of the SpellChecker.net site using customerid and password sent to you in the registration email.
Please open "Download SPROXY.CGI script" page for currently supported versions of the file. Click on the "Download SPROXY script" link.
Each of the archive files SPROXY_*.zip contains the following files:
- sproxy.cgi - main script;
- sproxy.ini - ini-file;
- *.tmpl (check.tmpl, dospell.tmpl, init.tmpl, opts.tmpl, result.tmpl, show.tmpl, unload.tmpl) - the template files.
2. Copy all files from sproxy_*.zip archive to the directory on
your web site that has permissions for script execution (for
example /cgi-bin or /scripts).
Perl script
If you downloaded
Perl version of sproxy.cgi, open the file in edit mode and
change its first line according to your Perl interpreter
location. This file is created to run on UNIX systems
and the first line will be #!/usr/bin/perl. Windows users should
alter this line to reflect the Perl location, for example
#!c:/perl/bin/perl.exe
(note the forward slashes).
3. The sproxy.ini file contains some variable
parameters, which must be customized. Find and change the
following parameters in this file:
a. SPCH_JS_PATH should be replaced with the full
URL where you placed the file spch.js. If you do not have
spch.js file please go to the http://www.spellchecker.net/support/getscript.html
to download it.
b. SPROXY_URL
should be replaced with
the full URL of the sproxy.cgi file. For example, http://my_server.com/cgi-bin/sproxy.cgi.
c. DEF_LANG should be replaced with the default
language to be used by SpellCheck. Change this parameter to
one of the following values:
en -
American English
uk - British English
fr - French
ge
- German
it - Italian
sp - Spanish
dk - Danish
br
- Brazilian Portuguese
nl - Dutch
no - Norwegian
pt
- Portuguese
se - Swedish
d. DEF_ENABLED
should be replaced with 'true' or
'false'. This variable defines the default state of Auto
SpellCheck. Set it to 'true' if you want it to be enabled by
default.
e. DEF_TIMEOUT
should be replaced with the desired
timeout value (in seconds) for background processing.
f. OPT_BG_CL
should be replaced with the desired
color value of the Settings Dialog background. Please use the
standard HTML codes for the colors.
g. AUTO_HIDE
can be [af] flag or nothing.
[af] stands for auto-finish. This flag turns on/off the
ability to automatically dispatch the checked text to the
text-box in your page. For example:
For Perl version
...
$auto_hide = "\"[af]\"";
...
or
...
$auto_hide = "\"\"";
...
For Win32 version
...
auto_hide = [af]
...
or
...
auto_hide =
...
For chat systems several other flags could also be used:
[dc] - don't close SpellCheck window. It saves the time on opening SpellCheck window. SpellCheck window will be a background window.
[sw] - small window. It has the sense because entered text in chat applications is usually short.
[cp] - close prompt. This flag turns on/off two links ("Abort SpellChecker" and "Send Without Checking") on the SpellCheck window during its initial loading. Press on "Abort SpellChecker" link closes SpellCheck window and returns to text-box. Press "Send Without Checking" link dispatches the text without checking and SpellCheck window is not closed.
For example: [dc][sw][cp][af] or [dc][af] or [af][dc][sw] or leave empty.
Use these
instructions to add our SpellChecker.net system to virtually
any text box on an HTML page. Supply your users with a
powerful and advantageous support function by completing the
following steps:
Top of page
STEP
1
Add this line of JavaScript code into the
HEAD tag (<HEAD> </HEAD>) of your web page:
|
<script type="text/javascript"
language="javascript" src=http://your_url/spch.js></script>
|
your_url should
be replaced with the actual url of the folder on your server
where you uploaded the spch.js file.
This line of code includes a JS library that enables the
doSpell function.
Top of page
STEP
2
This step includes the code to call the doSpell
function, opening the SpellCheck window and initializing a new
SpellCheck session.
Add either of these JavaScript
codes within the FORM tags (<FORM> </FORM >) in
the BODY section of your web page, according to the appearance
you desire:
To add SpellCheck
with an input button, use the following code:
| <INPUT TYPE = "BUTTON" VALUE =
"Spell Check" onclick="var f=document.forms[0]; doSpell(
'LANGUAGE', f.INPUTCONTROLNAME,
document.location.protocol + '//' +
document.location.host + '/CGIBIN/sproxy.cgi',
true);"> |
To add SpellCheck with a link, use the following code:
| <a href="javascript: var f=
document.forms[0];doSpell('LANGUAGE', f.INPUTCONTROLNAME,
document.location.protocol + '//' +
document.location.host + '/CGIBIN/sproxy.cgi', true);
">SPELLCHECK</a> |
Top of page