| 1 | /** |
| 2 | * init.js |
| 3 | * ------- |
| 4 | * Grabs the text from the SquirrelMail field and submits it to |
| 5 | * the squirrelspell. |
| 6 | * |
| 7 | * $Id$ |
| 8 | * |
| 9 | * @author Konstantin Riabitsev <icon@duke.edu> ($Author$) |
| 10 | * @version $Date$ |
| 11 | */ |
| 12 | |
| 13 | /** |
| 14 | * This is the work function. |
| 15 | * |
| 16 | * @param flag tells the function whether to automatically submit the |
| 17 | * form, or wait for user input. True submits the form, while |
| 18 | * false doesn't. |
| 19 | * @return void |
| 20 | */ |
| 21 | function sqspell_init(flag){ |
| 22 | textToSpell = opener.document.forms[0].subject.value + "\n" + opener.document.forms[0].body.value; |
| 23 | document.forms[0].sqspell_text.value = textToSpell; |
| 24 | if (flag) document.forms[0].submit(); |
| 25 | } |