How to call the function validate() on the form loading?
There is a form in which another program will fill some text boxes
automatically.
I need this JS function to test the value of text boxes and give user a alert
if any text box is empty.
<script type="text/javascript">
function validate()
{
var t1 = document.getElementById('<%=txtOrderProduct.ClientID%>');
var t2 = document.getElementById('<%=txtOrderBy.ClientID%>');
if(t1.value == "" && t2.value == "")
{
alert("Empty');
}
}
</script>
There is a form in which another program will fill some text boxes
automatically.
I need this JS function to test the value of text boxes and give user a alert
if any text box is empty.
<script type="text/javascript">
function validate()
{
var t1 = document.getElementById('<%=txtOrderProduct.ClientID%>');
var t2 = document.getElementById('<%=txtOrderBy.ClientID%>');
if(t1.value == "" && t2.value == "")
{
alert("Empty');
}
}
</script>