init.js 731 B

123456789101112131415161718192021222324
  1. /**
  2. * init.js
  3. *
  4. * Grabs the text from the SquirrelMail field and submits it to
  5. * the squirrelspell.
  6. *
  7. * @copyright © 2001-2006 The SquirrelMail Project Team
  8. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9. * @version $Id$
  10. */
  11. /**
  12. * This is the work function.
  13. *
  14. * @param flag tells the function whether to automatically submit the
  15. * form, or wait for user input. True submits the form, while
  16. * false doesn't.
  17. * @return void
  18. */
  19. function sqspell_init(flag){
  20. textToSpell = opener.document.compose.subject.value + "\n" + opener.document.compose.body.value;
  21. document.forms[0].sqspell_text.value = textToSpell;
  22. if (flag) document.forms[0].submit();
  23. }