Java HTML htmlHeaderGen(String errorMsg)

Here you can find the source of htmlHeaderGen(String errorMsg)

Description

html Header Gen

License

Open Source License

Declaration

public static String htmlHeaderGen(String errorMsg) 

Method Source Code

//package com.java2s;
/**//  w  w  w .j  av  a 2 s  .co  m
 * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved.
 * This software is published under the GPL GNU General Public License.
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version. 
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 * This software was written for the
 * Department of Family Medicine
 * McMaster University
 * Hamilton
 * Ontario, Canada
 */

public class Main {
    public static String htmlHeaderGen(String errorMsg) {
        StringBuilder htmlContentHeader = new StringBuilder();
        htmlContentHeader.append("<html>");
        htmlContentHeader.append(
                "<head><script type='text/javascript'>function openBrWindow(theURL,winName,features) { window.open(theURL,winName,features);}</script> </head>");
        htmlContentHeader.append(
                "<body><style type='text/css'><!-- .bodytext{  font-family: Tahoma, Arial, Helvetica, sans-serif;  font-size: 12px; font-style: normal;  line-height: normal;  font-weight: normal;  font-variant: normal;  text-transform: none;  color: #003366;  text-decoration: none; --></style>\n");
        htmlContentHeader.append("<table width='100%' border='0' cellspacing='0' cellpadding='0'> \n");
        htmlContentHeader.append("<tr> \n");
        htmlContentHeader.append("<td colspan='11' class='bodytext'>" + errorMsg + "</td> \n");
        htmlContentHeader.append("</tr> \n");
        return htmlContentHeader.toString();
    }
}

Related

  1. htmlFilterToEmpty(String value)
  2. htmlFooter()
  3. htmlFormat(String input)
  4. htmlFormatText(String line1, String line2)
  5. htmlHashTag(final String tagName)
  6. htmlify(String str)
  7. htmlItemName(int itemId)
  8. htmlLineBreaks(String s)
  9. htmlLink(String url, String linkName)