home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-mac-0.9.sea.hqx / mozilla-mac-0.9 / Chrome / pippki.jar / content / pippki / pippki.js < prev    next >
Text File  |  2001-05-05  |  1KB  |  38 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Mozilla Public
  4.  * License Version 1.1 (the "License"); you may not use this file
  5.  * except in compliance with the License. You may obtain a copy of
  6.  * the License at http://www.mozilla.org/MPL/
  7.  *
  8.  * Software distributed under the License is distributed on an "AS
  9.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10.  * implied. See the License for the specific language governing
  11.  * rights and limitations under the License.
  12.  *
  13.  * The Original Code is mozilla.org code.
  14.  *
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation.  Portions created by Netscape are
  17.  * Copyright (C) 1998 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  *
  20.  * Contributor(s):
  21.  *  Javier Delgadillo <javi@netscape.com>
  22.  */
  23.  
  24. /*
  25.  * These are helper functions to be included
  26.  * pippki UI js files.
  27.  */
  28.  
  29. function setText(id, value) {
  30.   var element = document.getElementById(id);
  31.   if (!element) return;
  32.      if (element.hasChildNodes())
  33.        element.removeChild(element.firstChild);
  34.   var textNode = document.createTextNode(value);
  35.   element.appendChild(textNode);
  36. }
  37.  
  38.