Javascript function is undefined on onclick event of anchor tag
<p>I am not able to access javascript function in onclick event of the anchor tag.</p>

<p>In some cases it is working and in some cases , not. </p>

<p>Can any body tell why it is happening.</p>

<p>HTML CODE - </p>

<pre><code>&lt;a  href='#'  class="btn waves-effect waves-light bg-blue" id="startDeviceScan" onclick="call286Dart123('CollectSysInfo', '3c6c3e33bb65e8331bf4c91c0670492e');" &gt;start device scan &lt;/a&gt;
</code></pre>

<p>Javascript function : </p>

<pre><code>function call286Dart123(a,b) {
    console.log(a + "\t" + b);
}
</code></pre>

<p>Fiddle link </p>

<p><a href="https://jsfiddle.net/o3ncv7pm/" rel="noreferrer">Fiddle Link</a></p>