My script runs fine and it alerts me the data is saved. but for Debug reason I want to see the PHP ("Procees.php") response as well in html format. I can see it in firebug but I do not know how to out put it using jquery. My codes are as follows;
var dataString ='doctype='+ doctype + '&paytype=' + paytype + '&docno=' + docno + '&bookno=' + bookno + '&prname=' + prname +'&pename='+pename+'&paydate='+paydate+'&inpdate='+indate
+'&e1='+e1 +'&e2='+e2 +'&e3='+e3 +'&e4='+e4 +'&e5='+e5 +'&e6='+e6 +'&e7='+e7 +'&e8='+e8
+'&accname1='+accname1 +'&accname2='+accname2 +'&accname3='+accname3 +'&accname4='+accname4 +'&accname5='+accname5 +'&accname6='+accname6 +'&accname7='+accname7 +'&accname8='+accname8
+'&dr1='+dr1 +'&dr2='+dr2 +'&dr3='+dr3 +'&dr4='+dr4 +'&dr5='+dr5 +'&dr6='+dr6 +'&dr7='+dr7 +'&dr8='+dr8
+'&cr1='+cr1 +'&cr2='+cr2 +'&cr3='+cr3+'&cr4='+cr4 +'&cr5='+cr5 +'&cr6='+cr6 +'&cr7='+cr7 +'&cr8='+cr8 +'&ref='+ref;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "bin/process.php",
data: dataString,
cache:false,
datatype: 'json',
success: function(data) {
$('#display').html("<h2>Data submitted!</h2>")
.append("<p>Wait........</p>")
.hide()
.fadeIn(1500, function() {
$('#display').append("<img id='checkmark' src='images/check-black.jpg' />");
$('#display').html("<h3>Being Processed...</h3>")
.fadeIn(1500, function() {
$('#display').append("Saved <img id='checkmark' src='images/check-black.jpg' />")
$('#thisfrm').get(0).reset();
$("#indate").val(indate)
});
});
}
});
return false;
My PHP echos
echo 'This is processing file.
';
$doctype = $_REQUEST['doctype'];
$paytype = $_REQUEST['paytype'];
$docno = $_REQUEST['docno'];
$bookno = $_REQUEST['bookno'];
$prname = $_REQUEST['prname'];
$pename = $_REQUEST['pename'];
$paydate = $_REQUEST['paydate'];
$inpdate = $_REQUEST['inpdate'];
$ref = $_REQUEST['ref'];
echo $doctype."<br>";
echo $paytype."<br>";
....
... and so on
but it is not shown anywahere on the webpage.
Thanks in advance for any help .