Posted
on May 19, 2006
(permalink)
Oh, not that I think it matters, but here is my script:
function TextBoxSource(editor)
{
this.editor = editor;
this.getText = function()
{
return this.editor.value;
}
this.setText = function(text)
{
this.editor.value = text;
}
}
function MultipleTextSource(sources)
{
this.sources = sources;
this.getText = function()
{
var texts = [];
for (var i = 0; i < this.sources.length; i++)
{
texts[texts.length] = this.sources[i].getText();
}
return texts.join("<controlSeparator><br></controlSeparator>");
}
this.setText = function(text)
{
var texts = text.split("<controlSeparator><br></controlSeparator>");
for (var i = 0; i < this.sources.length; i++)
{
this.sources[i].setText(texts[i]);
}
}
}
function startSpell(){
var sources = [
new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl02_txtDescription')),new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl03_txtDescription')),new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl04_txtDescription')),new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl05_txtDescription')),new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl06_txtDescription')),new TextBoxSource(document.getElementById('ctl00_ContentPlaceHolder1_gvPhotos_ctl07_txtDescription'))];
var spell = RadSpell.getSpellChecker('ctl00_ContentPlaceHolder1_spell1');
spell.setTextSource(new MultipleTextSource(sources));
spell.startSpellCheck();}