Hi,
This code will help you.
<script>
function validate()
{
if(document.thisForm.text1.value=="")
{
alert("Please enter the name");
return false;
}
if(document.thisForm.text2.value=="")
{
alert("Please enter the password");
return false;
}
document.thisForm.submit();
}
</scipt>
<body>
<form name=thisForm action="save.asp">
<input type=text1>
<input type=text2>
<Input type= "button" value=search onclick ="return validate()">
</form>
</body>
Thanks
Suresh Babu
|