javascript error. uncaught ReferenceError
<p>I am trying to write an anchor tag in a <code>for</code> loop, and sending parameters to a function in <code>onclick</code> event.</p>

<p>Now the problem is that the function does not pass the parameter which is in a variable instead it is getting an error "Uncaught ReferenceError: I is not defined ", where I is the value in the variable catidone.</p>

<pre><code>catlisttxt += '&lt;li&gt;'+catidone+'&lt;a href="#" onclick="return DisplayQues('+ catidone +')"&gt;'+data.categories[i].maincatname+'&lt;/a&gt;&lt;/li&gt;';
</code></pre>
