Unable to pass value in ajax
<p>i am trying to pass value through the following code, but unable please anyone check maybe i am mistaking somewhere</p>

<pre><code>&lt;input type="button" name="vote" value="Yes" width="100" onclick="getVote('; echo "y".$info['autoid']; echo')"/&gt;
</code></pre>

<p>the problem is in following line <strong>"y".$info['autoid'];</strong> if i remove <strong>"y".</strong> its works fine. but i want to pass y and product id.</p>

<p>basically i am trying to joint the y with the int.</p>

<p><strong>ok here is full code.</strong></p>

<pre><code> &lt;script type="text/javascript"&gt;

  function getVote(int)
  {
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
       xmlhttp.onreadystatechange=function()
         {
         if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
         {
      document.getElementById("poll").innerHTML=xmlhttp.responseText;
           }
    }
 xmlhttp.open("GET","../poll/"+int,true);
xmlhttp.send();
}
&lt;/script&gt;


&lt;div id="poll"&gt;
 &lt;form&gt;
poll - :
&lt;input type="button" name="vote" value="Yes" width="100" onclick="getVote('; echo     "y".$info['autoid']; echo')"/&gt;
&lt;input type="button" name="vote" value="No" width="100" onclick="getVote('; echo   "n".$info['autoid']; echo')"/&gt;
&lt;/form&gt;
 &lt;/div&gt;
</code></pre>

<p><strong>thanks guys...i found the other way we can pass "-" for yes and empty for "n"</strong></p>

<pre><code>&lt;input type="button" name="vote" value="Yes" width="100" onclick="getVote('; echo "-".$info['autoid']; echo')"/&gt;
&lt;input type="button" name="vote" value="No" width="100" onclick="getVote('; echo $info['autoid']; echo')"/&gt;
</code></pre>
