Thanks Jim. I removed the AYT.js.
However, just a first attempt, but running the spellchecker, it finishes immediately with the message "The spelling check is complete". I'm suspecting there may be an issue with the ID of the textbox parameters of the input button. I have added nothing to the vb code behind and haven't yet implemented userdictionary paths. Here's what I have (Repeater is simplified):
<script src="../../../../Scripts/Keyoti_RapidSpell_Web_Common/RapidSpell-DIALOG.js"></script>
<script type="text/javascript">
rapidSpell.setParameterValue("default", "ConsiderationRange", 500);
//client side function to highlight text box being checked, called when spell checker starts a
//new text box.
function Ondialog_startedcheckingtextbox(src, textBox) {
debugger;
//highlight current text box
textBox.style.border = "2px solid blue";
}
function Ondialog_finishedcheckingtextbox(src, textBox) {
//remove highlights on all text boxes
for (var i = 0; i < rsw_rapidSpellControls.length; i++) {
textBox = document.getElementById(rsTCInt[rsw_rapidSpellControls[i]].tbName);
textBox.style.borderWidth = '';
textBox.style.borderStyle = '';
textBox.style.borderColor = '';
}
}
//- Called when spell checking is finished
function NotifyDone(src, tb, complete) {
if (complete) {
alert("Spellcheck complete.");
//do whatever else
} else {
if (!confirm("You didn't finish spell checking, are you sure you want to cancel the spell check?")) {
//restart the spell checker - see userguide for this function's pattern
setTimeout("rapidSpell.dialog_spellCheck(true, tb)", 1); //Let the window close before reopening it
}
}
}
//- Called when corrections are made
function NotifyCorrection(src, tb, wordStart, oldWord, newWord) {
//write changes to correctionBox
document.getElementById("correctionBox").setAttribute("value", "'" + oldWord + "' at pos. " + wordStart + " changed to '" + newWord + "'");
}
//this function is for SPELLCHECKING changes to Entry, Target and Exit levels
function NotifyCorrection(src, tbName, wordStart, oldWord, newWord){
var n = tbName.indexOf("txt");
var res = tbName.substring(0, n + 3);
var hfName = res + "_flagChange"
document.getElementById(hfName).value = '1';
document.getElementById('<%= hdnOutcomeChanged.ClientID%>').value = 1;
}
rapidSpell.addEventListener('dialog_startedcheckingtextbox', Ondialog_startedcheckingtextbox);
rapidSpell.addEventListener('dialog_finishedcheckingtextbox', Ondialog_finishedcheckingtextbox);
rapidSpell.addEventListener('dialog_finishedcheckingtextbox', NotifyDone);
rapidSpell.addEventListener('dialog_correction', NotifyCorrection);
</script>
<input type="button" onclick="rapidSpell.dialog_spellCheck(true, ['txtEntryLevel', 'txtTargetLevel', 'txtExitLevel'])" value="Spell check" style="width: 90px; font-size: 12px" class="Button" />
<asp:Repeater ID="rptrEntryLevel" runat="server">
<ItemTemplate>
<td>
<asp:TextBox ID="txtEntryLevel" runat="server" Font-Size="11px" Height="60px"
Text='<%# Container.DataItem("EntryLev")%>' TextMode="MultiLine"
Width="140px" CssClass="normalText"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="txtTargetLevel" runat="server" Font-Size="11px" Height="60px"
Text='<%# Container.DataItem("TargetLev")%>' TextMode="MultiLine"
Width="140px" CssClass="normalText"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="txtExitLevel" runat="server" Font-Size="11px" Height="60px"
Text='<%# Container.DataItem("ExitLev")%>' TextMode="MultiLine"
Width="140px" CssClass="normalText"></asp:TextBox>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
Dave