Simple Popup Spell Checking

To use RapidSpell Web to spell check a web page in popup mode, create a page holding the

RapidSpellWeb Tag, then add the RapidSpellWebLauncher Tag to your existing page with the text element

you want checked, referencing the page you created with RapidSpellWeb in the rapidSpellWebPage property.

Example, note this code is highly simplistic for demonstration purposes.

Code Example RapidSpellCheckerPopUp.jsp

Page containing the RapidSpellWeb Tag

<%@ taglib uri="http://www.keyoti.com/" prefix="RapidSpellWeb" %>

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<html>

<title>Spell Check</title>

<body>

<Center>

<RapidSpellWeb:rapidSpellWeb/>

</center>

</body>

</html>

Code Example RSWL-Simple.jsp

Page containing the RapidSpellWebLauncher Tag, where the text element to be checked is located.

<%@ taglib uri="http://www.keyoti.com/" prefix="RapidSpellWeb" %>

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<HTML>

<BODY >

<%

if(request.getParameter("fMessage") == null){

%>

<form action='RSWL-Simple.jsp' method='post' name='myForm' id='myForm'>

<input type='hidden' name='fMessage' value='complete'>

<textarea name="sourceTextBox" wrap='true' cols='40' rows='10'>This

is some sample text with daliberate spelling errars</textarea>

<br>

<!-- Creates a 'Check Spelling' button,

TextComponentName = name of textarea to check,

-->

<RapidSpellWeb:rapidSpellWebLauncher

rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"

textComponentName="myForm.sourceTextBox"

separateHyphenWords="false"

userDictionaryFile="/dictionary.txt"

/>

<input type='submit'>

</form>

<%

} else {

%>

Text entered was:

"<%=request.getParameter("sourceTextBox")%>"

<%

}

%>

</body>

</HTML>

The main page (RSWL-Simple.jsp) uses the RapidSpellWebLauncher Tag to create the check spelling

button, it’s properties specify which form element to check (textComponentName), the URL of the page

containing the RapidSpellWeb control (rapidSpellWebPage) and the mode (mode). Note that (for

mode=’popup’) the properties textComponentName and callBack refer to form elements in Javascript

notation, relative to the document, i.e. they should always have the name of the form (or an element from the

forms array) followed by the text field name. RapidSpellWebPage can be a relative or absolute URL.