title: How to call a method of a controller from different views?
body: <p>I have a problem when calling a method that is in a controller, from different views. The method is CheckKeyName() is in "Project" controller and i try to call with ajax onchange event of a field. The field is in popup and that popup is placed in navigation menu and can be called from any view. But the problem is that when I'm in Project page and I call the method on nav menu ( and variable url in ajax is : url = 'CheckKeyName';) it works fine, but if I am on different controller for example Issue page, does not call the method and displays an error : "<a href="http://test/Issue/CheckKeyName" rel="nofollow">http://test/Issue/CheckKeyName</a> Failed to load resource: the server responded with a status of 404 (Not Found)".
  It does not work even if I write in url variable url= 'Project/CheckKeyName';
  Here I display my code:</p>
  
  <pre><code>function checkKeyName(keyname) {
              url = 'CheckKeyName';
              $.ajax({
                  url: url,
                  type: 'POST',
                  contentType: 'application/json;',
                  data: JSON.stringify({ keyname: keyname }),
                  success: function (result) {
                      if (result != "1") {// if there is same keyname found
                          $("#keyNameError").css('display', 'block');
                      }
                      else {
                          $("#keyNameError").css('display', 'none');
                      }
                  }
              });    
      }
  </code></pre>
  
  <p>Any help would be appreciated. 
  Thank you for your time.</p>
  
  <p>Fitore</p>