One more thing. I found that if I include an alert function at the end of the saveComments function, the value is saved correctly in IE and FF...however I don't want to have an alert and need to understand why this happens:
unction saveComments(){ curVal = $j("#act_progress").val(); origVal = $j("#originalText").text(); newVal = curVal + "\n\n" + origVal; $j("#act_progress").val(newVal); alert(newVal); } On Aug 28, 8:41 am, Mike Miller <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to do the following: > > I have a textarea on a page. I want to preserve the text that has > been previously entered in the text box. My solution has been to do > the following: > > function commentHistory() { > > var originalText = $j("#act_progress").text(); > $j("#act_progress").parent().append("<p /><b>History</b><p /><div > id='originalText'><pre style='font-size:10pt;font-family: verdana, > arial, helvetica, serif'>"+originalText+"</pre></div>"); > $j("#act_progress").text(""); > > } > > The above function displays the original value of the text box in its > own div. When a user goes to submit the form the following function > is called: > > function saveComments(){ > curVal = $j("#act_progress").val(); > origVal = $j("#originalText").text(); > > newVal = curVal + "\n\n" + origVal; > > $j("#act_progress").val(newVal); > > } > > In Firefox this behaves as expected in that the original value is > appended to the new value and both old and new are saved. However in > IE...only the new value is saved. Not sure why this is happening and > need to find a way around it. > > M