JavaScript code is limited to:
Example:
name of the form is:user_form
name of the input field is:comment
<FORM NAME="user_form" method="POST" action="somewhere.php"> <textarea name="comment"> </textarea><BR> <a href="spell_check.php?init=nojs" onclick="javascript:SpellCheck('user_form','comment');return false;">SpellCheck</A> <input name="submit" type="submit" value="Submit"> </FORM>You may add spellcheck links not only on one input field, but on every field used in form. If your page contains multiple forms you can add spellchecking on them as well. Parameters passing thru SpellCheck() are needed to know where to return the corrected text.
2.Copy the following JS code into the <head> </head> area of page where your form reside:
3.Copy the following HTML code in the page where your form reside:
4. Final Steps:
spell_check.php must reside in the same directory where your form is. If you copy in other dir, please
change the path to the script in:
(a).hidden_form: <FORM name="hidden_form" method="POST"action="path_to_the_script/spell_check.php?init=yes"
and in
(b).spellcheck link: <a href="path_to_the_script/spell_check.php?init=nojs" onclick="javascript:SpellCheck( ....
Spelling of other language (not English) is also possible if it is aspell supported. To do this change the line $int = pspell_new('en'); with appropriate letter
(function.pspell-new).
If you have any difficulties during the install and config I can offer free assistance via e-mail (or ICQ: 121014338 please write some 'spell check' words to the authorization subject). Any suggestions are welcome.
./configure --with-apxs2 --prefix=/usr --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-cgi --enable-bcmath --with-pspellIf you using RedHat/Fedora all this is set by default.
rpm -qa | grep aspelloutput:
rpm -qa | grep pspelloutput:
Please report success,bugs at E-mail: naka (at) 1001Line dot net
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome
to redistribute it under certain conditions; please refer to the
GNU General Public License for details.