Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8706111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:32:06+00:00 2026-06-13T03:32:06+00:00

i have two javascript funcions 1. function ValidateGVEducation() { var grid = document.getElementById(‘<%= gvEducation.ClientID

  • 0

i have two javascript funcions

1.

function ValidateGVEducation() {            

        var grid = document.getElementById('<%= gvEducation.ClientID %>');
        var ddlQuali, ddlUni, ddlInsti, ddlAreaS, ddlStat;

        //alert(grid.rows[1].cells[2].getElementsByTagName("*")[0].value);
        if (grid.rows.length > 0) {
            for (var i = 1; i < grid.rows.length; i++) {
                ddlQuali = grid.rows[i].cells[1].getElementsByTagName("*")[0];
                ddlUni = grid.rows[i].cells[2].getElementsByTagName("*")[0];
                ddlInsti = grid.rows[i].cells[3].getElementsByTagName("*")[0];
                ddlAreaS = grid.rows[i].cells[4].getElementsByTagName("*")[0];
                ddlStat = grid.rows[i].cells[6].getElementsByTagName("*")[0];
                if (ddlQuali.options[ddlQuali.selectedIndex].value != "0" ){
                    if (ddlUni.options[ddlUni.selectedIndex].value == "0" || ddlInsti.options[ddlInsti.selectedIndex].value == "0" || ddlAreaS.options[ddlAreaS.selectedIndex].value == "0" || ddlStat.options[ddlStat.selectedIndex].value == "0") {
                        alert('Fill Education Details');
                        return false;
                    }
                }

            }

            return true;
        }
        else return false;
    }

this function is invoke in another function

   function validateControlsForSubmit(){
    if (ValidateGVEducation()) {
       alert('Fill Education Details');
       return false;
     }     
    return true;
   }  

in later function is called in save button.after showing the alert the aspx code behind is executing..
return false is not working in this case..

function call is

<asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="Save" 
                     onclientclick="return validateControlsForSubmit();"  />

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:32:07+00:00Added an answer on June 13, 2026 at 3:32 am

    Using jQuery:

    <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="Save" />
    
    $("#<%=btnSave.ClientID%>").on("click", function(event){
        if (ValidateGVEducation()) {
           alert('Fill Education Details');
          event.preventDefault();
         } 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two functions function ShowCrossWord(var randN) { randomnumber = randN; $(document).ready(function() { $.get(crosswords.xml,{},function(xml){
So, I have two JavaScript functions: function Generate() { //Do something $.ajax({data:{Svc: 'cpMain', Cmd:
I have two javascript objects: var a = { x: 1, y: { faz:
I have two JavaScript arrays: var array1 = [Vijendra,Singh]; var array2 = [Singh, Shakya];
I have two arrays in JavaScript: var xcoord = []; and var ycoord =
I have two dates in javascript: var first = '2012-11-21'; var second = '2012-11-03';
I have two asp.net textboxes and need to put a validate function in javascript
I have two JavaScript files that contain a jQuery function with the same name
In Javascript, I have two versions of a recursive function, one that runs synchronously
I have a document, which has two javascript functions A(); and B(); .The functions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.