Hi,
When I run this code I get value 2 in text box. When I clear the text box and click on Test button I'm not getting alert. What could be the problem ? Thanks
<%@ Language=VBScript %>
<%
Dim Num
Num=2
%>
<html>
<head>
<script language="Javascript">
function Evaluate() {
if(document.form1.txtCategory=="" {
alert("Empty"
}
}
</script>
</head>
<body >
<form name=form1>
<input type="text" name="txtCategory" id="txtCategory" value="<%=Num%>">
<input type="button" value="Test" onclick="Evaluate()">
</form>
</body>
</html>
When I run this code I get value 2 in text box. When I clear the text box and click on Test button I'm not getting alert. What could be the problem ? Thanks
<%@ Language=VBScript %>
<%
Dim Num
Num=2
%>
<html>
<head>
<script language="Javascript">
function Evaluate() {
if(document.form1.txtCategory=="" {
alert("Empty"
}
}
</script>
</head>
<body >
<form name=form1>
<input type="text" name="txtCategory" id="txtCategory" value="<%=Num%>">
<input type="button" value="Test" onclick="Evaluate()">
</form>
</body>
</html>