rendered paste body // everything below is from LeadHandler2.js
var LeadData = new Object();
jQuery('#form1 :text:not(.notie)').each(function () {
LeadData[this.id] = this.value;
})
jQuery('#form1 .option').each(function() {
LeadData[this.id] = this.value;
})
jQuery('#form1 :hidden').each(function() {
LeadData[this.id] = this.value;
})
var DTO = { 'LeadData': LeadData };
var theURL = "http://localhost:55482/LeadHandler.asmx"; // debug, change later
jQuery.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: theURL,
data: JSON.stringify(DTO),
dataType: "json",
error:function(xhr, status, errorThrown) {
alert(errorThrown+'\n'+status+'\n'+xhr.statusText);
},
success: function (response) {
window.location = "thankyou.html";
},
failure: function (response) {
alert("Failure: ");
}
});