39e2e81baf7e762a372ac5502d68d7473c75908d larrym Thu Jul 26 13:21:22 2012 -0700 move some stuff into css file diff --git src/lib/htmshell.c src/lib/htmshell.c index 826ddcf..0ee49bf 100644 --- src/lib/htmshell.c +++ src/lib/htmshell.c @@ -243,34 +243,32 @@ if (htmlWarnBoxSetUpAlready) return; htmlWarnBoxSetUpAlready=TRUE; // NOTE: Making both IE and FF work is almost impossible. Currently, in IE, if the message // is forced to the top (calling this routine after <BODY> then the box is not resizable // (dynamically adjusting to its contents). But if this setup is done later in the page // (at first warning), then IE does resize it. Why? // FF3.0 (but not FF2.0) was resizable with the following, but it took some experimentation. // Remember what worked nicely on FF3.0: // "var app=navigator.appName.substr(0,9); " // "if(app == 'Microsoft') {warnBox.style.display='';} // else {warnBox.style.display=''; warnBox.style.width='auto';}" fprintf(f, "<script type='text/javascript'>\n"); fprintf(f, "document.write(\"<center>" - "<div id='warnBox' style='display:none; background-color:Beige; " - "border: 3px ridge DarkRed; width:640px; padding:10px; margin:10px; " - "text-align:left;'>" - "<CENTER><B id='warnHead' style='color:DarkRed;'></B></CENTER>" + "<div id='warnBox' style='display:none;'>" + "<CENTER><B id='warnHead'></B></CENTER>" "<UL id='warnList'></UL>" "<CENTER><button id='warnOK' onclick='hideWarnBox();return false;'></button></CENTER>" "</div></center>\");\n"); fprintf(f,"function showWarnBox() {" "document.getElementById('warnOK').innerHTML=' OK ';" "var warnBox=document.getElementById('warnBox');" "warnBox.style.display=''; warnBox.style.width='65%%';" "document.getElementById('warnHead').innerHTML='Warning/Error(s):';" "window.scrollTo(0, 0);" "}\n"); fprintf(f,"function hideWarnBox() {" "var warnBox=document.getElementById('warnBox');" "warnBox.style.display='none';warnBox.innerHTML='';" "var endOfPage = document.body.innerHTML.substr(document.body.innerHTML.length-20);" "if(endOfPage.lastIndexOf('-- ERROR --') > 0) { history.back(); }"