Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Behavior Customization
Search the Knowledge Base
How can I have the inline spell check update when the user leaves (blurs) a text box? (C#, VB.NET)
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=170&catId=55

Options

Print this page
Email this to a friend

To make the RapidSpell Web ASP.NET inline (as-you-type or not) spell checker check a RapidSpellWInlineTextBox control when the user leaves the text box (blur event) add the following Javascript to your page

<script type='text/javascript'>

function onready(){

for(var i=0; i<rsw_tbs.length; i++){

var tb = new RSWITextBox(rsw_tbs[i].shadowTB.id);

tb.Init();

tb.OnBlur = rswiTB_blur;

}

}

function rswiTB_blur(sender, args){

if(! (rsw_contextMenu && rsw_contextMenu.isVisible))

sender._getTBS().spellChecker.OnSpellButtonClicked();

}

</script>

 

and call this by adding an onload handler to your body tag, eg.

<body onload="rsw_aux_oninit_handlers[rsw_aux_oninit_handlers.length]='onready()';">

 

the onready function will register an OnBlur handler (the rswiTB_blur function) with each text box on the page.  The handler will call for a spell check when the blur happens, unless the spell check context menu is currently being shown (because the blur also happens when the user selects a correction from the spelling menu).


Related Questions:

Attachments:

No attachments were found.