src/lib/htmshell.c 1.49
1.49 2009/05/28 18:30:12 tdreszer
Kayla didn't like the prev button repeat errors
Index: src/lib/htmshell.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/htmshell.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -b -B -U 4 -r1.48 -r1.49
--- src/lib/htmshell.c 15 May 2009 20:32:30 -0000 1.48
+++ src/lib/htmshell.c 28 May 2009 18:30:12 -0000 1.49
@@ -212,10 +212,11 @@
if(noWarningsYet)
{
// 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>");
+ puts("<script type='text/javascript'>function doWarn() {var msg=document.getElementById('allWarnings'); if(msg.value.length> 5) {alert(msg.value);} msg.value='';};</script>");
+ puts("<script type='text/javascript'>function warn() {setTimeout(\"doWarn()\",50); return true;};document.onload=warn();</script>");
+ puts("<script type='text/javascript'>function addWarning(warning) {var msg=document.getElementById('allWarnings'); if(msg.value.length> 5) {msg.value+=\"\\n\\n\"+warning;}};</script>");
noWarningsYet=FALSE;
}
strSwapChar(warning,'\n',' ');