$(document).ready(function(){ 
          $("#submit").click(function(){ 
             //alert("Thanks for visiting!");
                       return false;
         });
          $("#submit").click(function(){
  // Call some function to handle Ajax request
  process();
 });
         
        });
        
        
        function process(){
 var firstname = jQuery("#formElement_First").attr("value");
 var lastname = jQuery("#formElement_Last").attr("value");
 var street1 = jQuery("#formElement_Street1").attr("value");
 var street2 = jQuery("#formElement_Street2").attr("value");
 var city = jQuery("#formElement_City").attr("value");
 var zip = jQuery("#formElement_Zip").attr("value");
 var state = jQuery("#formElement_State").attr("value");
 var dayphone = jQuery("#formElement_DaytimePhone").attr("value");
 var evephone = jQuery("#formElement_EveningPhone").attr("value");
 var email = jQuery("#formElement_Email").attr("value");
 var choice1 = jQuery("#formElement_9be26").attr("value");
 var choice2 = jQuery("#formElement_14794").attr("value");
 var choice3 = jQuery("#formElement_0137e").attr("value");
 var choice4 = jQuery("#formElement_5ac51").attr("value");
 var comments = jQuery("#formElement_Comments").attr("value");
 var securitycode = jQuery("#formElement_securitycode").attr("value");
 jQuery.ajax({
  type: "POST",
  url: "/dev/processform.php",
  dataType: "html",
  data: "firstname=" + firstname + "&lastname=" + lastname + "&street1=" + street1 + "&street2=" + street2 + "&city=" + city + "&zip=" + zip + "&state=" + state + "&dayphone=" + dayphone + "&evephone=" + evephone + "&email=" + email + "&choice1=" + choice1 + "&choice2=" + choice2 + "&choice3=" + choice3 + "&choice4=" + choice4 + "&comments=" + comments + "&securitycode=" + securitycode,
  success: function(response){
   // if sucessful; response will contain some stuff echo-ed from .php
   alert(response);
   // Append this response to some <div> => let's append it to div with id "serverMsg"
   //jQuery("#serverMsg").append(response);
  },
  error: function(){
   alert("Error occured during Ajax request...");
  }
 });
}

 

/*

<script language="javascript" type="text/javascript">
jQuery(document).ready(function(){
 // Cancel form submition, return false
 jQuery("#loginForm").submit(function(){
  return false;
 });
 // Manage submit button click event
 jQuery("#submnit").click(function(){
  // Call some function to handle Ajax request
  FormAjaxStuff();
 });
}); // End of jQuery(document).ready
function FormAjaxStuff(){
 var username = jQuery("#username").attr("value");
 var password = jQuery("#password").attr("value");
 jQuery.ajax({
  type: "POST",
  url: "scripts/process.php",
  dataType: "html",
  data: "username=" + username + "&password=" + password,
  success: function(response){
   // if sucessful; response will contain some stuff echo-ed from .php
   // quick tect: alert("Here is your response: " + response);
   // Append this response to some <div> => let's append it to div with id "serverMsg"
   jQuery("#serverMsg").append(response);
  },
  error: function(){
   alert("Error occured during Ajax request...");
  }
 });
} // END OF FormAjaxStuff()
</script>

*/
