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.
.NET version contains additional files:
-
bin/sproxy.dll
- compiled server-side logic;
-
Global.asax
- application caching support;
-
Web.config - replacement for .ini-file.
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 (Web.config ) 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 (There is no
such setting in Web.config since it handles it automatically).
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.
Since
iframe operates with HTML under the hood, when content is being
submitted to aspx, it is considered by ASP.NET as
dangerous and appropriate message is displayed preventing
normal spell checking flow. To make it work, introduce the
following statement in system.web section
of web.config file:
<pages
validateRequest="false" />
Use these instructions to add
our SpellChecker.net system to IFrame (Rich Edit) 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 in the BODY section of your web page,
according to the appearance you desire:
Please
note: the main difference between the SpellCheck for Virtually Any
TextBox and the SpellCheck for IFrame (Rich Edit) is the way to pass the
ControlName to the doSpell function - for Virtually Any TextBox it passed
using JavaScript object, for IFrame (Rich Edit) it passed using a string.
To add SpellCheck with an
input button, use the following code:
| <INPUT
TYPE = "BUTTON" VALUE = "SpellCheck" onclick= "doSpell( 'LANGUAGE',
'document.IFRAME_NAME.document.body',
document.location.protocol + '//' + document.location.host + '/CGIBIN/sproxy.cgi',
true);"> |
To add SpellCheck with a link, use the following code:
| <a
href="javascript: doSpell( 'LANGUAGE', 'document.IFRAME_NAME.document.body',
document.location.protocol + '//' + document.location.host + '/CGIBIN
/sproxy.cgi', true);">SPELLCHECK</a> |
Top of page