Spartan V SpellChecker

  The Spartan V Spellchecker(SVSC) is an easy to use library written in JavaScript(front end) and PHP(back end), using aspell (or Ispell for that matter) to provide the correction options.

  SVSC is available under the GNU LGPL, so as to be usefull in as many environments as possible.

  An example of SVSC in action is available here.

Download SVSC


  1. Have aspell or ispell installed on your system. e.g. apt-get install aspell
  2. Edit spellcheck.php so that $aspellcommand is set to reflect your spellchecker of choice. in our example we use /usr/bin/aspell -a --sug-mode fast -H -a makes it read from cat, -H allows it to ignore HTML formatting.
  3. Edit the page where you want to use the spellchecker in. You will need to create a hidden DIV tag where the corrections will take place.
  4. Add the javascript code to your file: e.g. <script type="text/javascript' src="spellcheck.js"></script>
  5. You will need a button or link or some other item to have an onClick handler. It will need to set the variable infoId to the ID of the form field you wish to correct. then set correctDiv to the ID of the DIV tag created above. Lastly it will call loadXMLDoc(url), where URL is the location of spellcheck.php.

  6. example.html is included in the download package, it has detailed comments explaining the purpose of each vital line of code.