]> git.mjollnir.org Git - moodle.git/commitdiff
Added a function useful for debugging Javascript problems
authormoodler <moodler>
Sat, 12 Oct 2002 04:09:51 +0000 (04:09 +0000)
committermoodler <moodler>
Sat, 12 Oct 2002 04:09:51 +0000 (04:09 +0000)
lib/javascript.php

index e8e15d16b9de21976409af03069c2672fcb0a777..51b418efe058dbd7036c054d1ebd574464f6f0cb 100644 (file)
@@ -1,20 +1,30 @@
 \r
 <SCRIPT LANGUAGE="JavaScript">\r
 <!-- //hide\r
+\r
+function popUpProperties(inobj) {\r
+  op = window.open();\r
+  op.document.open('text/plain');\r
+  for (objprop in inobj) {\r
+    op.document.write(objprop + ' => ' + inobj[objprop] + '\n');\r
+  }\r
+  op.document.close();\r
+}\r
+\r
 function fillmessagebox(text) {\r
- document.form.message.value = text;\r
 document.form.message.value = text;\r
 }\r
 \r
 function openpopup(url,name,height,width) {\r
- fullurl = "<?=$CFG->wwwroot ?>" + url;\r
- options = "menubar=0,location=0,scrollbars,resizable,width="+width+",height="+height;\r
- windowobj = window.open(fullurl,name, options);\r
- windowobj.focus();\r
 fullurl = "<?=$CFG->wwwroot ?>" + url;\r
 options = "menubar=0,location=0,scrollbars,resizable,width="+width+",height="+height;\r
 windowobj = window.open(fullurl,name, options);\r
 windowobj.focus();\r
 }\r
 \r
 function copyrichtext(textname) { \r
- textname.value = document.richedit.docHtml;\r
- return true;\r
 textname.value = document.richedit.docHtml;\r
 return true;\r
 }\r
 \r
 <? if ($focus) { echo "function setfocus() { document.$focus.focus() }\n"; } ?>\r