Methods
spellCheckWindow(strfield1 [,strfield2...] )
The spellCheckWindow function opens a spellchecker dialog similar to that of MS Word.
![spellCheckWindow(strfield1 [,strfield2...] )](images/dialog.gif)
Any number of fields, HTML elements or iFrames can be spell checked at one time. The strings or properties to be spell checked are added as a comma separated list of object paths in string format
Examples:
oSpell.spellCheckWindow('textarea1')
oSpell.spellCheckWindow('document.getElementById("textarea1")')
oSpell.spellCheckWindow(''textarea1'',''textarea2'',"textfield1")
oSpell.spellCheckWindow('strMyString')
oSpell.spellCheckWindow(any_property_or_variable)
oSpell.spellCheckWindow('iframe1.document.body.innerHTML')
Before opening the spellchecker window, you can double check for spelling mistakes in all of the the fields at once using the spellCheckWindowTest method.
spellCheckWindowTest (strfield1 [,strfield2...] )
The spellCheckWindowTest function allows you to determine if there are any spelling error in a group of fields. The inputs of this function conveniently exacty match those of spellCheckWindow.
![spellCheckWindowTest (strfield1 [,strfield2...] )](images/AjaxExamp2.gif)
This is useful for form validation - where a spellchcker will only be opened if there are spelling errors in the form.
It returns a result of true of false.
Note: the users web browser must have Ajax compatability for this function to work. Otherwise this function will return null.
spellCheck(strInput)
The spellCheck function allows you to check the spelling of any variable or property in JavaScript.
Example:
var oSpell = new JavaScriptSpellCheck();
oSpell.spellCheck('Any string or variable you like')
The result is true if the input is spelled correctly. If the input is not spelled correctly, the result is an Array of ordered spelling suggestions.
Note: the users web browser must have Ajax compatability for this function to work - otherwise it will return null.
ajaxSpellCheck(strInput)
The ajaxSpellCheck function automates an Ajax interface with the spellchecker engine.
ajaxSpellCheck is useless until integrated with the ajaxCallBack event function.
Note: the users web browser must have Ajax compatibility for this function to work. Otherwise it will return null.
|