Dear friends,
I have to check the values of feilds,if field value is empty then
i have to give messge like 'Pl.. enter the login name' in use alert message like popup window whenever i click the button.
if all fields entered then it's go to save.
I tried for this it's working fine to one function, but after checking the fields i called one more function i.e., in
VB function, then two functions are not working.
1. javascript fn
<script LANGUAGE="JavaScript">
function valid()
{
if (alertSubmit1() && alertSubmit2())
{
document.frmlogin.submit();
}
}
function alertSubmit1()
{
var str = document.Frmlogin.loginname.value
if (str=="")
{
alert("Enter your Login ...")
document.Frmlogin.loginname.focus()
return false
}
else
{
return true
}
}
function alertSubmit2()
{
var str1 = document.Frmlogin.passwd.value
if (str1=="")
{
alert("Enter your password ...")
document.Frmlogin.passwd.focus()
return false
}
else
{
return true
}
}
</script>
2.
vb function to save the data
here i given at button
onclick="valid" onserver click="save"
so, here it's saving but not checking the empty fields
please help me here what i have to do..
thanks in advance
I need a step by step, work thru this process...
thank you