rem: if (width.length > 0) globalElement.setAttribute("width", width); if (height.length > 0) globalElement.setAttribute("height", height); 
add: if (width.length > 0) globalElement.setAttribute("width", width); if (height.length > 0) globalElement.setAttribute("height", height); 
context: function ValidateData(){  var imageTypeExtension  = checkForImage();  if ( !imageTypeExtension ) {    ShowInputErrorMessage(GetString("MissingImageError"));    return false;  }  //TODO: WE NEED TO DO SOME URL VALIDATION HERE, E.G.:  // We must convert to "file:///" or "http://" format else image doesn't load!  var src = dialog.srcInput.value.trimString();  globalElement.setAttribute("src", src);    // TODO: Should we confirm with user if no alt tag? Or just set to empty string?  var alt = dialog.altTextInput.value.trimString();  globalElement.setAttribute("alt", alt);    var isPercentWidth = (dialog.widthUnitsSelect.selectedIndex == 1);  var maxLimitWidth = isPercentWidth ? 100 : maxPixels;  // Defined in EdDialogCommon.js  var isPercentHeight = (dialog.heightUnitsSelect.selectedIndex == 1);  var maxLimitHeight = isPercentHeight ? 100 : maxPixels;  // Defined in EdDialogCommon.js  //TODO: WE SHOULD ALWAYS SET WIDTH AND HEIGHT FOR FASTER IMAGE LAYOUT  //  IF USER DOESN'T SET IT, WE NEED TO GET VALUE FROM ORIGINAL IMAGE   var width = "";  var height = "";  if ( dialog.customsizeRadio.checked )  {    width = ValidateNumberString(dialog.widthInput.value, 1, maxLimitWidth);    if (width == "") {      dump("Image Width is empty\n");      dialog.widthInput.focus();      return false;    }    if (isPercentWidth)      width = width + "%";    height = ValidateNumberString(dialog.heightInput.value, 1, maxLimitHeight);    if (height == "") {      dump("Image Height is empty\n");      dialog.heightInput.focus();      return false;    }    if (isPercentHeight)      height = height + "%";  }  if ( dialog.originalsizeRadio.checked )  {  // for now (until we can get the actual image dimensions), clear the height/width attributes if not set    globalElement.removeAttribute( "width" );    globalElement.removeAttribute( "height" );  }  else  {  if (width.length > 0)    globalElement.setAttribute("width", width);  if (height.length > 0)    globalElement.setAttribute("height", height);  }  // spacing attributes  // All of these should use ValidateNumberString() to   //  ensure value is within acceptable range  if ( dialog.imagelrInput.value.length > 0 )  {    var hspace = ValidateNumberString(dialog.imagelrInput.value, 0, maxPixels);    if (hspace == "")      return false;    globalElement.setAttribute( "hspace", hspace );  }  else    globalElement.removeAttribute( "hspace" );    if ( dialog.imagetbInput.value.length > 0 )  {    var vspace = ValidateNumberString(dialog.imagetbInput.value, 0, maxPixels);    if (vspace == "")      return false;    globalElement.setAttribute( "vspace", vspace );  }  else    globalElement.removeAttribute( "vspace" );    // note this is deprecated and should be converted to stylesheets  if ( dialog.border.value.length > 0 )  {    var border = ValidateNumberString(dialog.border.value, 0, maxPixels);    if (border == "")      return false;    globalElement.setAttribute( "border", border );  }  else    globalElement.removeAttribute( "border" );  // Default or setting "bottom" means don't set the attribute  var align = "";  switch ( dialog.alignTypeSelect.selectedIndex )  {    case 0:      align = "top";      break;    case 1:      align = "center";      break;    case 3:      break;    case 4:      break;  }  if (align == "")    globalElement.removeAttribute( "align" );  else    globalElement.setAttribute( "align", align );  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/24a09371b809765acfcb129441fb6f120a955cb6/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js