Adding reminder
[squirrelmail.git] / plugins / squirrelspell / js / init.js
CommitLineData
849bdf42 1/**
a8380e75 2 * init.js
145dc7aa 3 *
4 * Copyright (c) 1999-2003 The SquirrelMail Project Team
5 * Licensed under the GNU GPL. For full terms see the file COPYING.
6 *
a8380e75 7 * Grabs the text from the SquirrelMail field and submits it to
8 * the squirrelspell.
9 *
10 * $Id$
a8380e75 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 */
849bdf42 21function sqspell_init(flag){
145dc7aa 22 textToSpell = opener.document.compose.subject.value + "\n" + opener.document.compose.body.value;
849bdf42 23 document.forms[0].sqspell_text.value = textToSpell;
c464f51a 24 if (flag) document.forms[0].submit();
849bdf42 25}