title: connect.send (form) , don't send
body: <p>sorry about my english. I have a problem with AJAX about one week, and can't solve it. I have Searched everywere. This is part of code of login.js function. I don't know why it don't work </p>
  
  <p>..</p>
  
  <pre><code>connect.open("POST","ajax.php?mode=login",true);
  connect.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  window.alert(form); //here I see the window,with the data form ok
  connect.send(form);
  </code></pre>
  
  <p>...</p>
  
  <p>The path of ajax.php it's right, I put a message at the begining of ajax.php to check, but never execute.</p>
  
  <p>ajax.php code...</p>
  
  <pre><code>&lt;?php
  if($_POST)
  {
  switch (isset($_GET['mode']) ? $_GET['mode'] : null)  
   {        
  case 'login':             
  echo "login case";        
    break;       
  
  default:           
    header('location: index.php');
   break;        
  }
  } 
  else
  {    
    header('location: index.php');  
   }
  ?&gt;
  </code></pre>
  
  <p>Thanks in advance...</p>