This could be due to changed id of controls have runat="server", you can user ClientIDMode="static" if you are using framework 4 or above or use the ClientID instead of id of control.
Using ClientIDMode
<textarea id="TextArea1" cols="20" rows="2" runat="server" ClientIDMode="static" ></textarea>
Using ClientID
<textarea id="TextArea1" cols="20" rows="2" runat="server" ></textarea>
In javascript
TextArea1 = document.getElementById("<%= TextArea1.ClientID %>");