title: calling javascript function from <select> onchange
body: <p>I am trying to call a javascript function from the onchange attribute of the <code>select</code> tag ! My issue is that I am passing the name attribute of the select to the function which always go null.</p>
  
  <pre><code>&lt;body&gt;
  
  
  &lt;form action="" method="post"&gt;
  &lt;select name="slct" id="name" onchange="rohan('measurement_conversion', '&lt;?php echo isset($_POST["slct"])?$_POST["slct"]:"null" ?&gt;')"&gt;
  &lt;option value="yes" selected="selected"&gt; yes &lt;/option&gt;
  &lt;option value="nopes"&gt; nopes &lt;/option&gt;
  &lt;option value="may be"&gt; May be &lt;/option&gt;
  &lt;option value="dont know"&gt; dont know &lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;div id="abc"&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p>And here my javascript function</p>
  
  <pre><code>&lt;script&gt;
  
  function rohan(var1, var2)
  {
  
      document.getElementById("abc").innerHTML=var1 + "            " + var2;
  }
  
  &lt;/script&gt;   
  </code></pre>
  
  <p>It always prints null..
  Any help will be appreciated !</p>