init.js 712 B

12345678910111213141516171819202122232425
  1. /**
  2. * init.js
  3. *
  4. * Copyright (c) 1999-2003 The SquirrelMail Project Team
  5. * Licensed under the GNU GPL. For full terms see the file COPYING.
  6. *
  7. * Grabs the text from the SquirrelMail field and submits it to
  8. * the squirrelspell.
  9. *
  10. * $Id$
  11. */
  12. /**
  13. * This is the work function.
  14. *
  15. * @param flag tells the function whether to automatically submit the
  16. * form, or wait for user input. True submits the form, while
  17. * false doesn't.
  18. * @return void
  19. */
  20. function sqspell_init(flag){
  21. textToSpell = opener.document.compose.subject.value + "\n" + opener.document.compose.body.value;
  22. document.forms[0].sqspell_text.value = textToSpell;
  23. if (flag) document.forms[0].submit();
  24. }