jQuery: value undefined
<p>i am rendering a select box using Ajax call in php   and the output is coming like </p>

<pre><code> &lt;select onchange = 'addtolist(this.val)' name='select_val' id='select_val' class= 'required'&gt;
&lt;option  value='xzvfxcv'&gt;xzvfxcv&lt;/option&gt;
&lt;option  value='dfscs'&gt;dfscs&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>ok and here is my function addtolist</p>

<pre><code>function addtolist(id){
  alert(id);

}
</code></pre>

<p>now while changing the select box i am getting the <code>undefined</code> </p>

<p>please help me out out what might i am doing wrong ?</p>
