Hi,
Lets say you have a TextBox like the following:
<asp:textbox id="txtBatch" runat="Server" text="1234"></asp:textbox>
In javascript do the following to get value:
var result = document.getElementById('<%=txtBatch.ClientID%>').value;
As TextBox is server control, so on runtime this control have different client id
'<%=txtBatch.ClientID%>'
will return control clientid on runtime
Then you can write
if(result.Equals(""))
Hope this helps !! :)
Regards,
Praneet