title: onClick is not working in codeigniter
body: <p>When I try to use <code>onClick</code> in the php page like:</p>
  
  <pre><code>&lt;a href="javascript:void(0);" onClick="deleteCourse('&lt;?php echo $row-&gt;courseId;?&gt;');" class="delete"&gt;Delete&lt;/a&gt;
  </code></pre>
  
  <p>and in js page I used like:</p>
  
  <pre><code>function deleteCourse(course_id){
      alert('trying to delete course');
   }, 
  </code></pre>
  
  <p>It will shows error like </p>
  
  <blockquote>
    <p>Uncaught ReferenceError: deleteCourse is not defined</p>
  </blockquote>
  
  <p>at HTMLAnchorElement.onclick but when I use onClick in the same page its working properly.</p>
  
  <h2>courselist.php</h2>
  
  <pre><code>&lt;?php if($deleteRole == 1){?&gt;
      &lt;a href="javascript:void(0);" onClick="deleteCourse('&lt;?php echo $row-&gt;courseId;?&gt;');" class="delete"&gt;Delete&lt;/a&gt;
  &lt;?php }?&gt;
  </code></pre>
  
  <h2>user.js</h2>
  
  <pre><code>function deleteCourse(course_id){
     alert('trying to delete course');
  }
  </code></pre>
  
  <p>That user.js is included properly, I have seen it in page source.</p>