title: $.post('link',...) not working
body: <p>this is my code</p>
  
  <pre><code>&lt;input type="text" id="name" class="name"&gt; 
  &lt;button id= "det_submit" onclick="submit_det()"&gt; Submit &lt;/button&gt;   
  &lt;script&gt;
  function submit_det() {    
      if(document.getElementById("name").value != "") {   
         $.post(
               'subscribe.php',{email : document.getElementById("name").value},
                function(data){
                    alert(data);
                });
      } else {
           alert("empty");
       }
     } 
  &lt;/script&gt;
  </code></pre>
  
  <p>the variable email is not sent to subscribe.php page...any help appreciated...Thank you</p>