Permalink
Browse files

Added a function useful for debugging Javascript problems

  • Loading branch information...
1 parent 1581d9b commit 2ec69fce6ad3d9002d3ac2384badd68b75df5232 moodler committed Oct 12, 2002
Showing with 17 additions and 7 deletions.
  1. +17 −7 lib/javascript.php
View
@@ -1,20 +1,30 @@
<SCRIPT LANGUAGE="JavaScript">
<!-- //hide
+
+function popUpProperties(inobj) {
+ op = window.open();
+ op.document.open('text/plain');
+ for (objprop in inobj) {
+ op.document.write(objprop + ' => ' + inobj[objprop] + '\n');
+ }
+ op.document.close();
+}
+
function fillmessagebox(text) {
- document.form.message.value = text;
+ document.form.message.value = text;
}
function openpopup(url,name,height,width) {
- fullurl = "<?=$CFG->wwwroot ?>" + url;
- options = "menubar=0,location=0,scrollbars,resizable,width="+width+",height="+height;
- windowobj = window.open(fullurl,name, options);
- windowobj.focus();
+ fullurl = "<?=$CFG->wwwroot ?>" + url;
+ options = "menubar=0,location=0,scrollbars,resizable,width="+width+",height="+height;
+ windowobj = window.open(fullurl,name, options);
+ windowobj.focus();
}
function copyrichtext(textname) {
- textname.value = document.richedit.docHtml;
- return true;
+ textname.value = document.richedit.docHtml;
+ return true;
}
<? if ($focus) { echo "function setfocus() { document.$focus.focus() }\n"; } ?>

0 comments on commit 2ec69fc

Please sign in to comment.