title: how to define URL for custom jquery ajax in Yii
body: <p>I have been writing some ajax request in an external javascript file, finding some difficulties to set the URL. When I check in the console that URL does not reach at controller. I wrote url in ajax as:</p>
  
  <pre><code>    $.ajax({
      type: 'POST',
      url: 'project/projectDelete',
      data: project_id,
      success: function(msg){
          if(msg == 'done') {
              $('.loaderContainer').hide();
              $('#'+projectid).parent().parent().remove();
          }
  
      }
  }); //END $.ajax
  </code></pre>
  
  <p>I got in console the URL request as <code>http://localhost/example/index.php/cp/project/project/projectDelete</code>. But it should be <code>http://localhost/decksgo_new/index.php/cp/project/projectDelete</code>. Is there any correct way to define URL in ajax in Yii external javascript.</p>