title: validateLogin is an undefined function.(javascript exception )
body: <p>Hi i am getting  error as undefined function i think my code is
  alright can anyone help in this case?  please help and suggest me a
  good tutorial for getting data through webservice via ajax method.</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.js"&gt;
  
    function validatelogin() {
  
          $('input[type=button]').attr('disabled', true);
          $("#login").html('');
          var loginId = $('#txt_id').attr('value'); // get username
          var password = $('#txt_pwd').attr('value'); // get password
  
          $.ajax({
  
              type: "POST",
              url: "WebService.asmx/validateLogin",
              data: "lognId=" + loginId + "&amp;password=" + password,
              contentType: "application/json; charset=utf-8",
  
               success: function (result) {
                      returnVal = result.d;
                      alert(returnVal);
                  },
  
                  error: function (XMLHttpRequest, textStatus, errorThrown) {
                      returnVal = '';
                      },
          });
       }
  
  
  &lt;/script&gt;
  </code></pre>