home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mozil06.zip / bin / chrome / messenger.jar / content / messenger / openSaveAttachment.js < prev    next >
Text File  |  2001-02-14  |  2KB  |  61 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  * 
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  * 
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  * 
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  *
  20.  * Contributor(s):
  21.  *   Henrik Gemal <gemal@gemal.dk>
  22.  */
  23.  
  24. function onLoad()
  25. {
  26.   var docnamebox = document.getElementById("documentNameBox");
  27.   if (docnamebox)
  28.   {
  29.     var docname = window.arguments[0].dspname;
  30.     var item = document.createElement('text');
  31.     if (item)
  32.     {
  33.       docnamebox.appendChild(item);
  34.       item.setAttribute('value', unescape(docname));
  35.     }
  36.   }
  37.   var saveit = document.getElementById("saveIt");
  38.   if (saveit)
  39.   {
  40.     window.arguments[0].opval = 2;
  41.   }
  42.   doSetOKCancel(0, onCancel, 0, 0);
  43.   moveToAlertPosition();
  44. }
  45.  
  46. function onOpen()
  47. {
  48.   window.arguments[0].opval = 1;
  49. }
  50.  
  51. function onSave()
  52. {
  53.   window.arguments[0].opval = 2;
  54. }
  55.  
  56. function onCancel()
  57. {
  58.   window.arguments[0].opval = 0;
  59.   return true;
  60. }
  61.