Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Behavior Customization
Search the Knowledge Base
How do I launch the spell check automatically when the page loads?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=40&catId=55

Options

Print this page
Email this to a friend
In this example it will be assumed that the checking should launch after some server side event (eg. a button click - but it could be anything).
 
 
To launch RapidSpellWInline controlled checking
 
The following Javascript will start/stop (toggle) the inline spell check
 
<%=RapidSpellWInline1.ClientID%>_SpellChecker.OnSpellButtonClicked(false);
 
It can be used from the body onload, eg.
 
  <script>   
   function runCheck(){
   <%=RapidSpellWInline1.ClientID%>_SpellChecker.OnSpellButtonClicked(false);
   }
  </script>
 </HEAD>
 <body onload="runCheck()">
 
or server side
 

private void Button1_Click(object sender, System.EventArgs e)

{

Page.RegisterClientScriptBlock("RSWEB", "<script>function runSpell(){ "+

RapidSpellWInline1.ClientID+"_SpellChecker.OnSpellButtonClicked(false);}window.onload=runSpell;</script>");

}

 
You shouldnt try this with more than one text box at once.  Instead you should use a RapidSpellWebMultiple control hooked up to the RapidSpellWInline controls.  To trigger the RapidSpellWebMultiple use the same code as with RapidSpellWebLauncher and RapidSpellWebMultiple (see below) - eg.
 
<%=RapidSpellWebMultiple1.ClientID%>_RunSpellCheck(true);
 
 
 
To launch RapidSpellWebLauncher controlled checking

private void Button1_Click(object sender, System.EventArgs e)

{

Page.RegisterClientScriptBlock("RSWEB", "<script>function runSpell(){popUpCheckSpelling"+RapidSpellWebLauncher1.ClientID+"('rsTCInt"+RapidSpellWebLauncher1.ClientID+"');}window.onload=runSpell;</script>");

}

 

To launch RapidSpellWebMultiple controlled checking

 

private void Button1_Click(object sender, System.EventArgs e)

{

Page.RegisterClientScriptBlock("RSWEB", "<script>function runSpell(){"+RapidSpellWebMultiple1.ClientID+"_RunSpellCheck(true);}window.onload=runSpell;</script>");

}

 
Now when Button1_Click is called, the checker will start once the page has loaded.

Related Questions:

Attachments:

No attachments were found.