rem: var index = gDialog.inputType.selectedIndex; switch (index) { case 4: case 5: break; case 8: if (!globalElement.hasAttribute("src")) { doImageProperties(); if (!globalElement.hasAttribute("src")) return false; } break; case 3: default: if (!gDialog.inputName.value || !gDialog.inputValue.value) { AlertWithTitle(GetString("Alert"), GetString("FormInputError")); if (!gDialog.inputName.value) gDialog.inputName.focus(); else gDialog.inputValue.focus(); return false; } } 
context: function ValidateData(){  var index = gDialog.inputType.selectedIndex;  switch (index)  {    case 4:    case 5:      break;    case 8:      if (!globalElement.hasAttribute("src"))      {        doImageProperties();        if (!globalElement.hasAttribute("src"))          return false;      }      break;    case 3:    default:      if (!gDialog.inputName.value || !gDialog.inputValue.value)      {        AlertWithTitle(GetString("Alert"), GetString("FormInputError"));        if (!gDialog.inputName.value)          gDialog.inputName.focus();        else          gDialog.inputValue.focus();        return false;      }  }  var attributes = {    type: "",    name: gDialog.inputName.value,    value: gDialog.inputValue.value,    tabindex: gDialog.inputTabIndex.value,    accesskey: "",    size: "",    maxlength: "",    accept: ""  };  var flags = {    checked: false,    readonly: false,    disabled: gDialog.inputDisabled.checked  };  switch (index)  {    case 1:      attributes.type = "password";    case 0:      flags.readonly = gDialog.inputReadOnly.checked;      attributes.size = gDialog.inputSize.value;      attributes.maxlength = gDialog.inputMaxLength.value;      break;    case 2:      attributes.type = "checkbox";      flags.checked = gDialog.inputChecked.checked;      break;    case 3:      attributes.type = "radio";      flags.checked = gDialog.inputSelected.checked;      break;    case 4:      attributes.type = "submit";      attributes.accesskey = gDialog.inputAccessKey.value;      break;    case 5:      attributes.type = "reset";      attributes.accesskey = gDialog.inputAccessKey.value;      break;    case 6:      attributes.type = "file";      attributes.accept = gDialog.inputAccept.value;      attributes.value = "";      break;    case 7:      attributes.type = "hidden";      attributes.tabindex = "";      break;    case 8:      attributes.type = "image";      attributes.value = "";      break;    case 9:      attributes.type = "button";      attributes.accesskey = gDialog.inputAccessKey.value;      break;  }  for (var a in attributes)  {    if (attributes[a])      globalElement.setAttribute(a, attributes[a]);    else      globalElement.removeAttribute(a);  }  for (var f in flags)  {    if (flags[f])      globalElement.setAttribute(f, "");    else      globalElement.removeAttribute(f);  }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/839fd1768cc3e3d4445e01452908b6c9e7a601c3/EdInputProps.js/buggy/editor/ui/dialogs/content/EdInputProps.js