context: function ValidateData(){  if ( !IsValidImage(dialog.srcInput.value )) {    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);  // Note: allow typing spaces,  // Warn user if empty string just once per dialog session  //   but don't consider this a failure  var alt = dialog.altTextInput.value;  if (doAltTextError && !alt)  {    ShowInputErrorMessage(GetString("NoAltText"));    SetTextboxFocus(dialog.altTextInput);    doAltTextError = false;    return false;  }  globalElement.setAttribute("alt", alt);  var width = "";  var height = "";  if (!dialog.actualSizeRadio.checked)  {    // Get user values for width and height    width = ValidateNumber(dialog.widthInput, dialog.widthUnitsMenulist, 1, maxPixels,                            globalElement, "width", false, true);    if (gValidationError)      return false;    height = ValidateNumber(dialog.heightInput, dialog.heightUnitsMenulist, 1, maxPixels,                             globalElement, "height", false, true);    if (gValidationError)      return false;  }  // We always set the width and height attributes, even if same as actual.  //  This speeds up layout of pages since sizes are known before image is downloaded  // (But don't set if we couldn't obtain actual dimensions)  if (!width)    width = actualWidth;  if (!height)    height = actualHeight;  if (width)    globalElement.setAttribute("width", width);  else    globalElement.removeAttribute("width");  if (height)    globalElement.setAttribute("height", height);  else    globalElement.removeAttribute("height");  // spacing attributes  ValidateNumber(dialog.imagelrInput, null, 0, maxPixels,                  globalElement, "hspace", false, true, true);  if (gValidationError)    return false;  ValidateNumber(dialog.imagetbInput, null, 0, maxPixels,                  globalElement, "vspace", false, true);  if (gValidationError)    return false;  // note this is deprecated and should be converted to stylesheets  ValidateNumber(dialog.border, null, 0, maxPixels,                  globalElement, "border", false, true);  if (gValidationError)    return false;  // Default or setting "bottom" means don't set the attribute  // Note that the attributes "left" and "right" are opposite  //  of what we use in the UI, which describes where the TEXT wraps,  //  not the image location (which is what the HTML describes)  switch ( dialog.alignTypeSelect.value )  {    case "top":    case "center":    case "right":    case "left":      globalElement.setAttribute( "align", dialog.alignTypeSelect.value );      break;    default:      globalElement.removeAttribute( "align" );  }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/492a58807eb0b22f626c1b330360545f64d5e70f/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js