Click here to Skip to main content
15,901,881 members

Comments by Software Engineer 892 (Top 102 by date)

Software Engineer 892 25-Mar-15 7:02am View    
Many Thanks..its working now.
Software Engineer 892 20-Nov-14 3:02am View    
Thank you...
Software Engineer 892 20-Nov-14 3:01am View    
Thanks
Software Engineer 892 19-Nov-14 2:14am View    
where should i place ur code. becoz we need one function/method name in OnClientClick="return chkAllValues()" like this.

Please help.
Software Engineer 892 19-Nov-14 1:42am View    
Sir,

This is my code for other textboxes validation for same page.

Can you please checkboxes script also in this code. am confused.

<script type="text/javascript">
function chkAllValues()
{

if(document.getElementById('TxtFirstName').value=="" || document.getElementById('TxtFirstName').value==0)
{
alert("Please enter First Name");
document.getElementById('TxtFirstName').focus();
return false;
}

if(document.getElementById('TxtLastName').value=="" || document.getElementById('TxtLastName').value==0)
{
alert("Please enter Last Name");
document.getElementById('TxtLastName').focus();
return false;
}

if(document.getElementById('TxtDepartment').value=="" || document.getElementById('TxtDepartment').value==0)
{
alert("Please enter Department");
document.getElementById('TxtDepartment').focus();
return false;
}


return confirm('are you sure ? you want to Submit this details ?');
}



BUTTON
======
<asp:ImageButton ID="BtnSubmit" runat="server"
ImageUrl="Submit.png" CausesValidation="true"
onclick="BtnSubmit_Click" OnClientClick="return chkAllValues()"/>
</script>

Thanks in advance.