$("#listingerrorSnd").click(function () {
var GenName = document.getElementById("<%: anonName.ClientID %>").value;
var fromEmail = document.getElementById("<%: anonEmail.ClientID %>").value;
var GenSubject = document.getElementById("<%: typeErr.ClientID %>").value;
var GenMsg = document.getElementById("<%: TMNmsg.ClientID %>").value;
var Esname = document.getElementById("<%: escortName.ClientID %>").value;
var data = "{'name': '" + GenName + "', 'fromEmail': '" +
fromEmail + "','subject': '" + GenSubject + "','msg': '" + GenMsg + "'}";
//,'EscortName':" + Esname +
alert(data)
$.ajax({
type: "POST",
url: "../serv.aspx/SendEsError",
cache: false,
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
//if(r.length > 0)
// // do something
// console.log(r.data);
//{
//else
//{
// console.log("no result");
//}
//complete: function (transport) {
// for testing purposes
// $('#formcontainer').hide().html('<h1>The status is: ' + transport.status + '</h1>').fadeIn(800);
//if (transport.status == 200) {
$('#reportError').fadeOut(950);
$('#formcontainer').hide().html('<h1>Success</h1>').fadeIn(800);
$('#listingerrorsntmsg').hide().fadeIn(1000);
//$('#listingerrorsntmsg').html('<br /><br /><blockquote>Thank you <strong>' + GenName + '</strong> the report has been sent to TMN and we will look into it ASAP to fix any errors with <strong>' + Esname + 's</strong> listing. ' + r.d)
$('#listingerrorsntmsg').html(r.GenName);
//console.log(r.Esname);
alert(r.d)
//}
},
error: function (data, status, error) {
//$("#errorDiv").fadeIn(800);
//$("#errorDiv").html('error occured: ' + error + '<br /><br />');
$('#reportError').fadeOut(950);
$('#formcontainer').hide().html('<h1><span>Please try again later ' + GenName + '</span></h1>').fadeIn(1500);
console.log(error);
}
//else {
//alert("Please try again later");
//$('#reportError').fadeOut(950);
//$('#formcontainer').hide().html('<h1><span>Please try again later ' + GenName + '</span></h1>').fadeIn(1500);
// }
//}
});
<WebMethod()>
Public Shared Function SendEsError(ByVal GenName As String, ByVal fromEmail As String, ByVal GenSubject As String, ByVal GenMsg As String, ByVal EsName As String) As String
Return "Hello " & GenName & DateTime.Now.ToString()
End Function
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.