Hi,
The masterpage's form id and the form name will change into aspnetForm at runtime automatically.
The design code:
<form id="frm" runat="server" defaultbutton="btnSearch">
The source code at runtime :
<form name="aspnetForm" method="post" action="Default.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
So you should use like below in javascript:
var theForm = document.forms['aspnetForm'];
theForm = document.aspnetForm;
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support