Knowledgebase Home Page  >  RapidSpell Web Java
Search the Knowledge Base
How do I check multiple text boxes with a MODAL popup (RapidSpell Web Java)?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=124&catId=45

Options

Print this page
Email this to a friend

The RapidSpellWebMultiple control is great for checking multiple text boxes with non modal popups.  Modal popups work a little differently, but are simple to use to check multiple text boxes, with a little client side code.

 

The page below has two text boxes, each with their own RapidSpellWebLauncher control, note the important settings are in bold.  The Javascript function "runSpellCheck()" launches the spell checkers in succession, the parts in blue are dependent on the ID's given to the RapidSpellWebLaunchers in the code - if you have more than three text boxes, then you should add them to the array;

 

var rswlCntrls = ["rapidSpellWebLauncher","rapidSpellWebLauncher2", "rapidSpellWebLauncher3", "..ID4.."];

 

 

 

Here is the complete page;

 

 

 <%@ taglib uri="/WEB-INF/RapidSpellWeb.tld" prefix="RapidSpellWeb" %>

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<TITLE>Keyoti RapidSpell Web</TITLE>
<script>
function runSpellCheck(){
var rswlCntrls = ["
rapidSpellWebLauncher","rapidSpellWebLauncher2", "rapidSpellWebLauncher3"];
for(var i=0; i<rswlCntrls.length; i++){
eval("popUpCheckSpelling"+rswlCntrls[i]+"('rsTCInt"+rswlCntrls[i]+"')");
}
}
</script>

</HEAD>
<BODY >

<form action='exampleTextBox1.jsp' method='post' name='myForm'>

<!--------------------- Text box 1 -------------------------------------------------------->
<textarea name="sourceTextBox" wrap='true' cols='55' rows='10'>This is boxx 1.</textarea>

<br><br>



<RapidSpellWeb:rapidSpellWebLauncher
id="rapidSpellWebLauncher"
rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"
textComponentName="myForm.sourceTextBox"
modal="True"
showButton="false"
showNoErrorsMessage="False"
showFinishedMessage="False"
windowX="-1"
/>

<br><br>


<!--------------------- Text box 2 -------------------------------------------------------->
<textarea name="sourceTextBox2" wrap='true' cols='55' rows='10'>This is boxx 2.</textarea>

<br><br>

<RapidSpellWeb:rapidSpellWebLauncher
id="rapidSpellWebLauncher2"
rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"
textComponentName="myForm.sourceTextBox2"
modal="True"
showNoErrorsMessage="False"
showFinishedMessage="False"
showButton="false"

windowX="-1"
/>

<br><Br>


<!--------------------- Text box 3 -------------------------------------------------------->
<textarea name="sourceTextBox3" wrap='true' cols='55' rows='10'>This is boxnumber 3.</textarea>

<br><br>

<RapidSpellWeb:rapidSpellWebLauncher
id="rapidSpellWebLauncher3"
rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"
textComponentName="myForm.sourceTextBox3"
modal="True"
showNoErrorsMessage="False"
showFinishedMessage="False"
showButton="false"

windowX="-1"
/>
<input type=button onclick="runSpellCheck()" value="Check Spelling" >

</form>

</BODY>
</HTML>

 


Related Questions:

Attachments:

No attachments were found.