Basically I call a function when user clicks save, this function takes the content from textarea and passes it to a php file that adds it to the database. I have a few js functions I use, one for switching between content and another for saving it. Anyway if i just click save without editing anything in the textarea, then everything works fine. However if I edit the text in any way (Even removing a letter and adding it back again) parts of the functions stop working. The part that is responsible for modifying content. I have marked the part that stops working.Basically I call a function when user clicks sa