1. Store the current onload handler and call it explicitly. Eg. if the current code is window.onload=myHandler; then change it to
<script type="text/javascript"> var existingOnloadHandler = window.onload; window.onload=myHandler; function myHandler(){ if(typeof(existingOnloadHandler)=='function') existingOnloadHandler(); //...current code } </script>
2. Or, assign the onload handler using window.addEventListener (IE9 and others) or window.attachEvent (IE8 down).
<script type='text/javascript'> rapidSpell.ayt_helperURL ="<%=request.getContextPath()%>/a.rapidspellweb?t=a"; </script>
rapidSpell.ayt_ignoreTextBoxIds[rapidSpell.ayt_ignoreTextBoxIds.length] = 'textBox1'; //where textBox1 is the id attribute of a textbox rapidSpell.ayt_ignoreTextBoxIds[rapidSpell.ayt_ignoreTextBoxIds.length] = '<%= textBox1.ClientID %>'; //where textBox1 is an asp:textbox tag.
If no elements are marked with the class rsw_spellable, then nothing will be spell checked. If elements are marked with rsw_spellable but also set to be ignored in the above array, they will not be spell checked.
Please see the user dictionary topic.
In the HEAD of the page, add a Javascript block which calls rapidSpell.ayt_aytEnabled = false;
<script type="text/javascript"> rapidSpell.ayt_aytEnabled = false; </script>
Trigger the spell check using Javascript, eg. in a button click handler;
<input type="button" onclick="rapidSpell.ayt_spellCheck(document.getElementById('textBox1'))" value="Spell Check" />
In this mode, the spell check is triggered by a button, and the underlines are overlayed in an uneditable box - when the user finishes spell checking the underlines disappear.
<script type="text/javascript"> rapidSpell.ayt_aytEnabled = false; rapidSpell.ayt_staticMode = true; </script>
Trigger the spell check using Javascript, eg. in a button click handler (in this call we pass 'this' so that the button's text can be changed to match spell check state);
<input type="button" onclick="rapidSpell.ayt_spellCheck(document.getElementById('textBox1'), this)" value="Spell Check" />
To change the text used in alerts and the context menu, either set the GuiLanguage parameter or to change a specific text, call rapidSpell.ayt_setUIText(language, identifier, newText), eg;
<script type="text/javascript"> rapidSpell.ayt_setUIText('ENGLISH', 'add', 'Add to dictionary'); </script>
The first argument specifies the language that is being changed (ie for the corresponding GuiLanguage parameter). The second argument specifies the label as follows:
ignore | Ignore once menu item text |
ignoreAll | Ignore all menu item text |
add | Add menu item text |
edit | Edit menu item text (shown in static mode only) |
changeAll | Change all menu item text |
removeDuplicate | Remove duplicate menu item text |
noSuggestions | 'No suggestions' menu item text |
complete | Spell check complete |