rem: editcontrol.innerHTML += "<input type='hidden' name='save' value='Attach" + type + "'/><input type='hidden' name='caretPosition' value='"+ store + "'/>"; 
add:  editcontrol.innerHTML += "<input type='hidden' name='save' value='attach" + type + "'/><input type='hidden' name='caretPosition' value='"+ store + "'/>"; 
context: function addAttachment(textareaid, formid, editcontrolid, type) {  var textarea;  var editcontrol;  var form;  var store;  if ( document.all ) {    textarea = document.all[textareaid];    editcontrol = document.all[editcontrolid];    form = document.all[formid];  } else {    textarea = document.getElementById(textareaid);    editcontrol = document.getElementById(editcontrolid);    form = document.getElementById(formid);  }      if (typeof(textarea.caretPos) != "undefined" && typeof(textarea.createTextRange) != "undefined")  {    var duplicate = textarea.caretPos.duplicate();    var textareaRange = textarea.createTextRange();    textareaRange.select();    textareaRange = document.selection.createRange().duplicate();    duplicate.select();    var duplicateText = duplicate.text;    var length = duplicateText.replace(/\r\n/g,"\n").length;    duplicate.setEndPoint("StartToStart", textareaRange); 	    duplicateText = duplicate.text;    var endPoint = duplicateText.replace(/\r\n/g,"\n").length;    var startPoint = endPoint - length;    store = startPoint + ":" + endPoint;  } else if (typeof(textarea.selectionStart) != "undefined") {    store = textarea.selectionStart + ":" + textarea.selectionEnd;  } else {    store = "0:0";  }  editcontrol.innerHTML += "<input type='hidden' name='save' value='Attach" + type + "'/><input type='hidden' name='caretPosition' value='"+ store + "'/>";  form.submit();}
meta: 1235	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1235/2989a637f5bed47cc60c84b927dfe7a9cd91a178/stateswitcher.js/buggy/rwiki/rwiki-tool/tool/src/webapp/scripts/stateswitcher.js