title: How to call codeigniter function through javascript function
body: <p>This is  not working in my codeigniter function i have the id and cannot get that id.Please help me. this is my view and i am trying to send my id through the function.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function makeajaxcall(id) {
          //alert(id);
          var r = confirm("Do you want to Delete");
          if (r == true) {
              window.location.href = "&lt;?php echo site_url('controller_d/login/admin_link_delete_user?id='.id);?&gt;";
          } else {
              x = "You pressed Cancel!";
              alert(x);
          }
  
      }
  &lt;/script&gt;
  </code></pre>