rem: var startHourRange = startHourRangeNode.selectedItem.getAttribute("data"); 
add: var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); 
context: function Commit(){  var changed = false;  // Grovel through the fields to see if any of the values have  // changed. If so, update the RDF graph and force them to be saved  // to disk.  for (var i = 0; i < gFields.length; ++i) {    var field = document.getElementById(gFields[i]);    if (field) {      // Get the new value as a literal, using 'null' if the value is empty.      var newvalue = field.value;      var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkURL),                                         RDF.GetResource(gProperties[i]),                                         true);      if (oldvalue)        oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral);      if (newvalue && gProperties[i] == (NC_NAMESPACE_URI + "ShortcutURL")) {        // shortcuts are always lowercased internally        newvalue = newvalue.toLowerCase();      }      else if (newvalue && gProperties[i] == (NC_NAMESPACE_URI + "URL")) {        // we're dealing with the URL attribute;        // if a scheme isn't specified, use "http://"        if (newvalue.indexOf(":") < 0)          newvalue = "http://" + newvalue;      }      if (newvalue)        newvalue = RDF.GetLiteral(newvalue);      if (updateAttribute(gProperties[i], oldvalue, newvalue)) {        // Update gBookmarkURL if the url changed        if (newvalue && gProperties[i] == NC_NAMESPACE_URI + "URL")          gBookmarkURL = newvalue.Value;        changed = true;      }    }  }    // Update bookmark schedule if necessary;  // if the tab was removed, just skip it  var scheduleTab = document.getElementById("ScheduleTab");  if (scheduleTab) {    var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule";    oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkURL),                                   RDF.GetResource(scheduleRes), true);    newvalue = "";    var dayRangeNode = document.getElementById("dayRange");    var dayRange = dayRangeNode.selectedItem.getAttribute("data");    if (dayRange) {      var startHourRangeNode = document.getElementById("startHourRange");      var startHourRange = startHourRangeNode.selectedItem.getAttribute("data");      var endHourRangeNode = document.getElementById("endHourRange");      var endHourRange = endHourRangeNode.selectedItem.getAttribute("data");      if (parseInt(startHourRange) > parseInt(endHourRange)) {        var temp = startHourRange;        startHourRange = endHourRange;        endHourRange = temp;      }      var bookmarkBundle;      var duration = document.getElementById("duration").value;      if (!duration) {        bookmarkBundle = document.getElementById("bundle_bookmark");        alert (bookmarkBundle.getString("pleaseEnterADuration"));        return false;      }      var methods = [];      if (document.getElementById("bookmarkIcon").checked)        methods.push("icon");      if (document.getElementById("playSound").checked)        methods.push("sound");      if (document.getElementById("showAlert").checked)        methods.push("alert");      if (document.getElementById("openWindow").checked)        methods.push("open");      if (methods.length == 0) {        bookmarkBundle = document.getElementById("bundle_bookmark");        alert (bookmarkBundle.getString("pleaseSelectANotification"));        return false;      }      var method = methods.join(); // join string in array with ","      newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method;    }    if (newvalue)      newvalue = RDF.GetLiteral(newvalue);    if (updateAttribute(scheduleRes, oldvalue, newvalue))      changed = true;  }  if (changed) {    var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);    if (remote)      remote.Flush();  }  window.close();  return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0b2dd2b2d2fd037df917e07645fa019a963332a5/bm-props.js/buggy/xpfe/components/bookmarks/resources/bm-props.js