goba            Mon Jan 10 07:55:43 2005 EDT

  Modified files:              
    /phpdoc/scripts/quickref    originalafter.js processafter.php 
  Log:
  use some DOM instead of document.write() to prevent browser problems
  
http://cvs.php.net/diff.php/phpdoc/scripts/quickref/originalafter.js?r1=1.14&r2=1.15&ty=u
Index: phpdoc/scripts/quickref/originalafter.js
diff -u phpdoc/scripts/quickref/originalafter.js:1.14 
phpdoc/scripts/quickref/originalafter.js:1.15
--- phpdoc/scripts/quickref/originalafter.js:1.14       Sun Jan  9 07:47:15 2005
+++ phpdoc/scripts/quickref/originalafter.js    Mon Jan 10 07:55:42 2005
@@ -26,7 +26,15 @@
     isnotopera=true;
     width="min-width:155px";
 }
-_d.write("<div id=\"funchelper\" style=\"background-color: white; border: 1px 
solid black; top: 90px;"+width+"; padding: 4px; font-size: 9px; display:none; 
position:absolute;\"></div>");
+var funchelper = _d.createElement('div');
+funchelper.setAttribute('style', 'background-color: white; border: 1px solid 
black; top: 90px;'+width+'; padding: 4px; font-size: 9px; display:none; 
position:absolute;');
+var elems = _d.getElementsByTagName("*");
+for (var i = 0; i < elems.length; i++) {
+    if (elems[i].tagName.toLowerCase() == 'body') {
+        elems[i].appendChild(funchelper);
+        break;
+    }
+}
 
 // Decompression 
---------------------------------------------------------------
 
http://cvs.php.net/diff.php/phpdoc/scripts/quickref/processafter.php?r1=1.11&r2=1.12&ty=u
Index: phpdoc/scripts/quickref/processafter.php
diff -u phpdoc/scripts/quickref/processafter.php:1.11 
phpdoc/scripts/quickref/processafter.php:1.12
--- phpdoc/scripts/quickref/processafter.php:1.11       Wed Dec 22 14:06:33 2004
+++ phpdoc/scripts/quickref/processafter.php    Mon Jan 10 07:55:42 2005
@@ -16,7 +16,7 @@
   | Authors:    Mitja Slenc <[EMAIL PROTECTED]>                              |
   +----------------------------------------------------------------------+
   
-  $Id: processafter.php,v 1.11 2004/12/22 19:06:33 goba Exp $
+  $Id: processafter.php,v 1.12 2005/01/10 12:55:42 goba Exp $
 */
 
 $lines = file("originalafter.js");
@@ -35,7 +35,8 @@
     "push", "pop", "default", "true", "false", "offsetLeft", "offsetParent",
     "while", "null", "tagName", "clientLeft", "parseInt", "border", "isNaN",
     "getAttribute", "charCode", "keyCode", "cc", "setTimeout", "fh_HideAll",
-    "setAttribute", "replace", "g", "s", "getCookie"
+    "setAttribute", "replace", "g", "s", "getCookie", "createElement",
+    "getElementsByTagName", "appendChild", 
 );
 
 $text = implode(" ", $lines);

Reply via email to