title: to send parameters through ajax jquery call to server
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8103374/submitting-form-and-variables-together-through-jquery">submitting form and variables together through jquery</a>  </p>
  </blockquote>
  
  
  
  <p>I am using following code to send form data to the server through ajax, jquery:</p>
  
  <pre><code>// this is the id of the submit button
  $("#submitButtonId").click(function() {
  
      var url = "path/to/your/script.php"; // the script where you handle the form input.
  
      $.ajax({
             type: "POST",
             url: url,
             data: $("#idForm").serialize(), // serializes the form's elements.
             success: function(data)
             {
                 alert(data); // show response from the php script.
             }
           });
  
      return false; // avoid to execute the actual submit of the form.
  });
  </code></pre>
  
  <p>If i have to send a parameter/value of my own other than the post form data, how can i do it?
  Thanks.</p>