This is the JavaScript that is errored on in IE but works in FF (error - \"document.getelementsbyname(...).0.innerhtml is null or not an object\":
var oldVal =
If you have .NET 4.0 then you can write clean id's and then just use getElementById, since as Carnotaurus state's, getElementByName functions different across browsers.
http://weblogs.asp.net/scottgu/archive/2010/03/30/cleaner-html-markup-with-asp-net-4-web-forms-client-ids-vs-2010-and-net-4-0-series.aspx
If you're stuck on .NET 2.0/3.5, then you can use jQuery to access elements by either Id, or Name, or many other selectors.
http://api.jquery.com/category/selectors/
Also I wrote a library to output a json array of ID's for .NET 2.0/3.5.
http://awesomeclientid.codeplex.com/
http://www.philliphaydon.com/2010/12/i-love-clean-client-ids-especially-with-net-2-0/
This gets around the INamingContainer slapped on all the controls runat server, it outputs an array like:
<script type=”text/javascript”>
//<![CDATA[
var controls = {
"txtUserName": "ctl00_ContentPlaceHolder1_txtUserName",
"txtEmail": "ctl00_ContentPlaceHolder1_txtEmail",
"btnSubmit": "ctl00_ContentPlaceHolder1_btnSubmit"
};
//]]>
</script>
Then you can access the elements by ID like so:
var element = document.getElementById(controls.btnSubmit);
GetElementByName functions differently across different browsers. I suggest you access your elements using jQuery.