add: if (hostnameIsIllegal(gSmtpHostname.value)) { var prefsBundle = document.getElementById("bundle_prefs"); var brandBundle = document.getElementById("bundle_brand"); var alertTitle = brandBundle.getString("brandShortName"); var alertMsg = prefsBundle.getString("enterValidHostname"); var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); if (promptService) promptService.alert(window, alertTitle, alertMsg); else window.alert(alertMsg);  window.arguments[0].result = false; return false; }  
context: function onAccept(){    // if we didn't have an SMTP server to initialize with,    // we must be creating one.    try {        if (!smtpServer) {            smtpServer = smtpService.createSmtpServer();            window.arguments[0].addSmtpServer = smtpServer.key;        }                saveSmtpSettings(smtpServer);    } catch (ex) {        dump("Error saving smtp server: " + ex + "\n");    }    window.arguments[0].result = true;    return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/100f9782b1094f77d32cac9222cb24fea537f5d4/SmtpServerEdit.js/clean/mailnews/base/prefs/resources/content/SmtpServerEdit.js