JavaScriptSpellCheck Demos
Examples with source-code
- Basic HTML Form Spell Check
- Advanced Form Spelling Validation
- Ajax Spell Check
- Multi-Language Spell Check
- Rich Editor Compatible
Ajax Spell Check
Tutorial
Ajax (Asynchronous JavaScript And XML) allows live server interactions from web pages - such as the live spelling validation above.
Ajax is notoriously tricky to implement - fortunately - we have done all of the hard work for you.
Step 1 - Callback
Set up your Ajax callback function to handle the results of the Ajax spellcheck. The variable result will be true is spelling is OK. If there is a spelling mistake then result will be an array of suggestions.
var oSpell = new JavaScriptSpellCheck();
oSpell.ajaxCallBack=function(result)
{
alert (result)
}
Step 2 - Call The Ajax Spell Checker
You can ajaxSpellCheck any string or HTML node .
oSpell.ajaxSpellCheck('Any String')
or
oSpell.ajaxSpellCheck(document.getElementById('input1').value)
