Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Rich/HTML Textboxes
Search the Knowledge Base
How can I set or get the content of a RapidSpellWInlineTextBox with Javascript?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=110&catId=56

Options

Print this page
Email this to a friend
The content of a RapidSpellWInlineTextBox (used for dynamic error highlighting) is settable/gettable on the server through the .Text property. 
 
 
 
 
To SET the text on the client side requires a couple of extra lines beyond the usual.
 
eg.
 
Suppose we want to set the text on the click of a button;
 
 <input type=button onclick='setTB("<%=RapidSpellWInlineTextBox1.ClientID%>")'>
 
this function gets the text box instance and set's the .value property, it then calls updateIframe on the text box object to update the view to the user.
 
function setTB(id){
    var tb = document.getElementById(id);
    tb.value="some new text";
    var tbs = rsw_getTBSFromID(id);
    tbs.updateIframe();
}
 
 
 
 
To GET the text from a text box, just access it as usual.
 
eg;
 
var tb = document.getElementById(id);
var content = tb.value;
 
 

Related Questions:

Attachments:

No attachments were found.