User:Hippietrail/debugportlet.js

Hello, you have come here looking for the meaning of the word User:Hippietrail/debugportlet.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Hippietrail/debugportlet.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Hippietrail/debugportlet.js in singular and plural. Everything you need to know about the word User:Hippietrail/debugportlet.js you have here. The definition of the word User:Hippietrail/debugportlet.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Hippietrail/debugportlet.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
/*
<pre>
*/

// output text to the debug portlet
function debugPrint( dbtxt ) {
  var p_db = document.getElementById('p-debug');

  if (p_db) p_db.style.display = 'block';

  //document.getElementById('dbTextarea').innerHTML += dbtxt;
  //document.dbForm.dbTextarea.innerHTML += dbtxt;

  //document.dbForm.dbTextarea.value += dbtxt;
  document.getElementById('dbTextarea').value += dbtxt;
}

// add a portlet for outputting debug messages
function addDebugPortlet() {

  // find the search portlet. we want to be after it
  var p_search = document.getElementById('p-search');

  if (p_search) {
    var p_db;
    var newh;
    var pbody;
    var newform;
    var newdiv;
    var newtextarea;

    p_db = document.createElement('div');
    p_db.id = 'p-debug';
    p_db.className = 'portlet';
    p_db.style.display = 'none';

    newh = document.createElement('h5');
    newh.appendChild(document.createTextNode('Debug'));
    p_db.appendChild(newh);

    pbody = document.createElement('div');
    pbody.className = 'pBody';
    p_db.appendChild(pbody);

    newform = document.createElement('form');
    newform.id = 'dbForm';
    newform.name = 'dbForm';
    pbody.appendChild(newform);

    newdiv = document.createElement('div');
    newform.appendChild(newdiv);

    newtextarea = document.createElement('textarea');
    newtextarea.id = 'dbTextarea';
    newtextarea.name = 'dbTextarea';
    //newtextarea.readOnly = 'readonly';
    newdiv.appendChild(newtextarea);

    // insert our constructed portlet between the search and toolbox portlets
    p_search.parentNode.insertBefore(p_db, p_search.nextSibling);
  }
}

/*
</pre>
*/