ca2a368fd1e1ebc2d8a823014637cf568cd2ae14
[squirrelmail.git] / plugins / squirrelspell / js / init.js
1 /**
2 INIT.JS
3 -------
4 Grabs the text from the SquirrelMail field and submits it to
5 the squirrelspell.
6 **/
7 function sqspell_init(flag){
8 // flag tells the function whether to automatically submit the form, or
9 // wait for user input. True submits the form, while False doesn't.
10 textToSpell = opener.document.forms[0].subject.value + "\n" + opener.document.forms[0].body.value;
11 document.forms[0].sqspell_text.value = textToSpell;
12 if (flag) document.forms[0].submit();
13 }