src/lib/htmshell.c 1.48
1.48 2009/05/15 20:32:30 tdreszer
IE turns out to be a pain. Switched from div.innerHTML to textarea.value in order to preserve newlines.
Index: src/lib/htmshell.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/htmshell.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -b -B -U 4 -r1.47 -r1.48
--- src/lib/htmshell.c 15 May 2009 18:57:17 -0000 1.47
+++ src/lib/htmshell.c 15 May 2009 20:32:30 -0000 1.48
@@ -210,12 +210,12 @@
char warning[512];
vsprintf(warning,format, args);
if(noWarningsYet)
{
- // This will only be put into the document once (DO NOT depend on jQuery!)
- puts("<div id='allWarnings' style='display:none;'>Warnings:</div>");
- puts("<script type='text/javascript'>function addWarning(warning) {docllument.getElementById('allWarnings').innerHTML += '\\n\\n'+warning;};</script>");
- puts("<script type='text/javascript'>function warn() {setTimeout(\"alert(document.getElementById('allWarnings').innerHTML);\",50); return true;};onload=warn();</script>");
+ // This will only be put into the document once (DO NOT depend on jQuery!) (IE is a royale pain with innerHTML: used textarea)
+ puts("<textarea id='allWarnings' style='display:none;'>Warning(s):</textarea>");
+ puts("<script type='text/javascript'>function warn() {setTimeout(\"alert(document.getElementById('allWarnings').value);\",50); return true;};document.onload=warn();</script>");
+ puts("<script type='text/javascript'>function addWarning(warning) {document.getElementById('allWarnings').value+=\"\\n\\n\"+warning;};</script>");
noWarningsYet=FALSE;
}
strSwapChar(warning,'\n',' ');