Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a function useful for debugging Javascript problems

  • Loading branch information...
commit 2ec69fce6ad3d9002d3ac2384badd68b75df5232 1 parent 1581d9b
moodler authored
Showing with 17 additions and 7 deletions.
  1. +17 −7 lib/javascript.php
View
24 lib/javascript.php
@@ -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"; } ?>
Please sign in to comment.
Something went wrong with that request. Please try again.