title: Rewrite of this code because serialize() doesn't work
body: <p>I have this ajax jquery code:</p>
  
  <pre><code>var form = document.getElementById('frm');
              var data_string = form.serialize();
              $.ajax({
                  type:       "POST",
                  url:        "my_php_file.php",
                  data:       data_string,
                  success:    function(data) {
  
                  }//end success function
              }) //end ajax call
  </code></pre>
  
  <p>This is in an external file called ajax.js.</p>
  
  <p>I include ajax.js into an html file called "show.html".
  I also include jquery.js into show.html</p>
  
  <p>I have tried getting the serialize to work, but the code is terminated right before executing the serialize.
  I have no idea why. But I am sure that it is the serialize which is causing it.</p>
  
  <p>Is it possible to make some easy modification to this, so it doesn't use serialize?</p>
  
  <p>Thanks</p>
  
  <p>UPDATE:</p>
  
  <p>This code (from answer below) seems to work partially also, when I alert the "form" variable, the message says "HTML Form Object" so it finds the form.
  Then when I alert the "data_string" variable, the message says "frm=undefined".</p>
  
  <p>Any ideas why?</p>
  
  <pre><code>var form = document.getElementById('frm');
  var data_string = $(form).serialize();
  </code></pre>