rem: var textboxNotEmpty; if(document.getElementById( textboxId ).textLength >= 1 ) textboxNotEmpty = true else textboxNotEmpty = false var buttonDisabled  = document.getElementById( buttonId ).disabled; var textboxAndButton = (textboxNotEmpty + buttonDisabled); 
add: var theTextbox = document.getElementById( textboxId ); var theButton  = document.getElementById( buttonId ); 
context: function processTextboxWithButton( textboxId, buttonId ){    var textboxNotEmpty;    if(document.getElementById( textboxId ).textLength >= 1 )        textboxNotEmpty = true    else        textboxNotEmpty = false    var buttonDisabled  = document.getElementById( buttonId ).disabled;    var textboxAndButton = (textboxNotEmpty + buttonDisabled);    debug("textboxNotEmpty: "  + textboxNotEmpty);    debug("buttonDisabled: "   + buttonDisabled);    debug("textboxAndButton: " + textboxAndButton);    // 0 = no text, button enabled (wrong - disable button)    // 1 = no text, button disabled  or text, button enabled (right) [most popular]    // 2 = text, button disabled (wrong - enable button)    switch(textboxAndButton) {    case 1:        break;    case 0:        disableElement( buttonId );        break;    case 2:        enableElement( buttonId );        break;    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/93ea52d81d9c85d15eaa5ab62c2ebb7a324903cd/eventDialog.js/clean/calendar/resources/content/eventDialog.js