Knowledgebase Home Page  >  RapidSpell Web Java
Search the Knowledge Base
Is it possible to start the spell check automatically when the page loads?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=32&catId=45

Options

Print this page
Email this to a friend

Yes, using some Javascript in your page's onLoad event handler.

Ensure that you have set the "id" attribute of the RapidSpellWebLauncher tag, eg;

          <RapidSpellWeb:rapidSpellWebLauncher
           id="rswl1"    ..............         />

You can then call a Javascript function from the onLoad handler, eg;

   <BODY  onLoad="popUpCheckSpellingrswl1('rsTCIntrswl1');">

Note that parts in red must be the same as the RapidSpellWebLauncher tag's "id" attribute.

Full example;

<%@ taglib uri="/WEB-INF/RapidSpellWeb.tld" prefix="RapidSpellWeb" %>
<HTML>
   <HEAD>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <TITLE>Keyoti RapidSpell Web </TITLE>


      </HEAD>
   <BODY bgcolor="#EAEEF7" topmargin="0" marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" marginright="0" bottommargin="0" link="#a1aD00" vlink="#a1aD00" alink="#a1aD00" onLoad="popUpCheckSpellingrswl1('rsTCIntrswl1');">
   <table border="0" cellpadding="0" cellspacing="0" width="100%"
  
   >
         <tr>
            <td width="4%" bgcolor="#EAEEF7" background="images/title-back-colour.jpg"><img src="images/title-back-colour.jpg"></td>
            <td width="182" height="84"><img src="images/title-left.jpg"></td>
            <td height="83" background="images/title-line.jpg" valign="top"><img src="images/title-line.jpg"></td>
            <td valign="top" height="83" width="69"><img src="images/title-curve.jpg"></td>
            <td valign="top" height="83" background="images/title-right.jpg" width="450"><img src="images/title-right.jpg"></td>
         </tr>
      </table>


      <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td width="100%" background="images/blue-box-top.png" height="2"><img src="images/blue-box-top.png"></td>
         </tr>
         <tr>
            <td height="76" bgcolor="#C2E6C7" align="center">
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td width="10%"></td>
                     <td width="85%" align="left">
                        <p class="pageTitle">RapidSpell Web Java, example JSP web application</p>
                     </td>
                     <td align="right" width="65%"></td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr>
            <td width="100%" background="images/blue-box-bottom.png" height="2"><img src="images/blue-box-bottom.png"></td>
         </tr>
      </table><br><table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td width="100%" background="images/blue-box-top.png" height="2"><img src="images/blue-box-top.png"></td>
         </tr>
         <tr>
            <td bgcolor="#C1CDE5" align="center">
               <table border="0" cellpadding="0" cellspacing="0" width="80%">
                  <tr>
                     <td align="center">
                        <table border="0" cellpadding="0" cellspacing="8">
                           <tr>
                              <td colspan="9"></td>
                           </tr>
                           <tr>
                              <td width="500" valign="top" align="left" bgcolor="#C1CDE5">
                                 <div class="section">


                                 <%
                                 if(request.getParameter("fMessage") == null){
                                 %>
         

          <form action='exampleTextBox1.jsp' method='post' name='myForm'>
           <input type='hidden' name='fMessage' value='complete'>
           <textarea name="sourceTextBox" wrap='true' cols='40' rows='10'>This this is some sample text with daliberate spelling errars</textarea>
           <br>
           <RapidSpellWeb:rapidSpellWebLauncher
           id="rswl1"
           rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"
           textComponentName="myForm.sourceTextBox"
           userDictionaryFile="<%=request.getRealPath("dictionary.txt")%>"
           />

           <input type='submit'>
          </form>


                                 <%
                                 } else {
                                 %>

          Text entered was:
          "<%=request.getParameter("sourceTextBox")%>"

                                 <%
                                 }
         %>

                                 </div>
                              </td>
                              <td width="5"></td>
                              <td width="1" bgcolor="#B0C1E0"><img src="images/vlightblue.gif" border="0" width="1" height="1"></td>
                              <td width="5"></td>
                              <td width="154" valign="top" align="right">
                                 <div class="section"></div>
                              </td>
                           </tr>
                        </table>
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr>
            <td width="100%" background="images/blue-box-bottom.png" height="2"><img src="images/blue-box-bottom.png"></td>
         </tr>
      </table>

 

 

 

      <br><br><p class="copyrightMessage">Copyright &copy; 2002-2004 Keyoti</p><br><br><br></BODY>
</HTML>

 


Related Questions:

Attachments:

No attachments were found.