The error was: " + errMsg + "<\/h4>"); bd.title="Error Window"; // Only supposed to be a read value. bd.bgColor="#ffcccc"; // the document must be opened first before setting the color. bd.close(); return true}