Click here to Skip to main content
15,844,013 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    
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    

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");
return false;

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

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

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

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

Thanks in advance.