rem: var headerTitleItem = document.getElementById( "standard-dialog-title-text" ); headerTitleItem.setAttribute( "value" , titleString );  
add: setFieldValue( "standard-dialog-title-text", titleString );  
context: function loadCalendarEventDialog(){   // Get arguments, see description at top of file      var args = window.arguments[0];      gMode = args.mode;      gCategoryManager = args.CategoryManager;   // remember function to call when OK is clicked      gOnOkFunction = args.onOk;   gEvent = args.calendarEvent;      // mode is "new or "edit"   // show proper header      if( "new" == args.mode )   {      var titleDataItem = document.getElementById( "data-event-title-new" );   }   else   {      var titleDataItem = document.getElementById( "data-event-title-edit" );   }      var titleString = titleDataItem.getAttribute( "value" );   var headerTitleItem = document.getElementById( "standard-dialog-title-text" );   headerTitleItem.setAttribute( "value" , titleString );      // show proper tip      var tipNewItem = document.getElementById( "tip-new" );   var tipEditItem = document.getElementById( "tip-edit" );     if( "new" == args.mode )   {      tipNewItem.setAttribute( "collapsed", "false" );      tipEditItem.setAttribute( "collapsed", "true" );   }   else   {      tipNewItem.setAttribute( "collapsed", "true" );      tipEditItem.setAttribute( "collapsed", "false" );   }        //create the category drop down   //if( !gCategoryManager )   //   Categories = opener.gCategoryManager.getAllCategories();   //else   //   Categories = gCategoryManager.getAllCategories();   Categories = new Array();   var MenuPopup = document.getElementById( "category-field-menupopup" );   for ( i in Categories )    {       var MenuItem = document.createElement( "menuitem" );       MenuItem.setAttribute( "value", Categories[i].id );       MenuItem.setAttribute( "label", Categories[i].name );       MenuPopup.appendChild( MenuItem );   }   // fill in fields from the event   var startDate = new Date( gEvent.start.getTime() );   var endDate = new Date( gEvent.end.getTime() );   setDateFieldValue( "start-date-text", startDate );   setTimeFieldValue( "start-time-text", startDate );   setTimeFieldValue( "end-time-text", endDate );   gTimeDifference = gEvent.end.getTime() - gEvent.start.getTime(); //the time difference in ms      if ( gEvent.recurForever )    {      var today = new Date();      gEvent.recurEnd.setTime( today );   }   var recurEndDate = new Date( gEvent.recurEnd.getTime() );      setDateFieldValue( "repeat-end-date-text", recurEndDate );   setFieldValue( "title-field", gEvent.title  );   setFieldValue( "description-field", gEvent.description );   setFieldValue( "location-field", gEvent.location );   setFieldValue( "category-field", gEvent.category );      setFieldValue( "all-day-event-checkbox", gEvent.allDay, "checked" );   setFieldValue( "private-checkbox", gEvent.privateEvent, "checked" );      setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );   setFieldValue( "alarm-length-field", gEvent.alarmLength );   setFieldValue( "alarm-length-units", gEvent.alarmUnits, "data" );   setFieldValue( "alarm-length-units", gEvent.alarmUnits, "value" );     if ( gEvent.alarmEmailAddress && gEvent.alarmEmailAddress != "" )    {      setFieldValue( "alarm-email-checkbox", true, "checked" );      setFieldValue( "alarm-email-field", gEvent.alarmEmailAddress );   }   else   {      setFieldValue( "invite-checkbox", false, "checked" );   }      if ( gEvent.inviteEmailAddress != undefined && gEvent.inviteEmailAddress != "" )    {      setFieldValue( "invite-checkbox", true, "checked" );      setFieldValue( "invite-email-field", gEvent.inviteEmailAddress );   }   else   {      setFieldValue( "invite-checkbox", false, "checked" );   }      setFieldValue( "repeat-checkbox", gEvent.recur, "checked");   setFieldValue( "repeat-length-field", gEvent.recurInterval );   setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" );     setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" );   setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" );      // update enabling and disabling      updateRepeatItemEnabled();   updateStartEndItemEnabled();   updateAlarmItemEnabled();   updateInviteItemEnabled();         /*   ** set the advanced weekly repeating stuff   */   setAdvancedWeekRepeat();      setFieldValue( "advanced-repeat-dayofmonth", ( gEvent.recurWeekNumber == 0 || gEvent.recurWeekNumber == undefined ), "checked" );   setFieldValue( "advanced-repeat-dayofweek", ( gEvent.recurWeekNumber > 0 ), "checked" );      // set up OK, Cancel      doSetOKCancel( onOKCommand, 0 );      // start focus on title      var firstFocus = document.getElementById( "title-field" );   firstFocus.focus();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e73ed928b8f708de374b049a8af1563244bd627c/calendarEventDialog.js/buggy/calendar/resources/content/calendarEventDialog.js