rem: var firstNameField = doc.getElementById('FirstName'); var lastNameField = doc.getElementById('LastName'); var displayNameField = doc.getElementById('DisplayName'); 
add: var firstNameField = getElementById('FirstName'); var lastNameField = getElementById('LastName'); var displayNameField = getElementById('DisplayName'); 
context: function GenerateDisplayName(){	if ( editCard.generateDisplayName )	{		var doc = frames["editcard"].document;		var displayName;				var firstNameField = doc.getElementById('FirstName');		var lastNameField = doc.getElementById('LastName');		var displayNameField = doc.getElementById('DisplayName');		/* todo: i18N work todo here */		/* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */				/* todo:  mscott says there was a pref in 4.5 that would */		/* cause GenerateDisplayName() to do nothing.  */		/* the i18N people need it. */		/* find the pref and heed it. */		/* trying to be smart about no using the first last sep */		/* if first or last is missing */		/* todo:  is this i18N safe? */				var separator = "";		if ( lastNameField.value && firstNameField.value )		{			if ( editCard.displayLastNameFirst )			 	separator = editCardLastFirstSeparator;			else			 	separator = editCardFirstLastSeparator;		}				if ( editCard.displayLastNameFirst )			displayName = lastNameField.value + separator + firstNameField.value;		else			displayName = firstNameField.value + separator + lastNameField.value;					displayNameField.value = displayName;		if ( editCard.card )			top.window.title = editCardTitlePrefix + displayName;		else			top.window.title = newCardTitlePrefix + displayName;	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/bacba6b1578cffea0c9d1eeb8ce70f3023ce9a20/editcard.js/clean/mailnews/addrbook/resources/content/editcard.js