I am using the following jquery function in my asp file
$(function() {
$("#frm-submit").submit(function() {
var data = $(this).serialize(),
action = $(this).attr("action"),
method = $(this).attr("method");
//Hide Login Button
//$('#loginprogress').html('<img src="images/loading_bar.gif">'); // Show Progress Spinner
//$(".loading").show(); // show loading div
$.ajax({
url: action,
type: method,
data: data,
success: function(data) {
$("#stage").text(data);
document.location = "***awp.asp***"; // Hide Progress Spinner
},
error: function(err) {
// there was something not right...
},
complete: function() {
$(".loading").hide(); // hide the loading
}
});
return false; // don't let the form be submitted
});
}
);
my awp.asp file is
objdb.execute("insert into awp values('"& awpid &"','"& varcid &"','"& varsid &"','"& varmcid &"','"& varsubacid &"','"& varselaid &"','"& varselsubaid &"','"& vardivid &"','-','"& varunits &"','"& varucost &"','"& varptarget &"','"& varftarget &"','"& varbbenefper &"','"& varida &"','"& vargovtcot &"','"& varbcont &"','"& now() &"','"& loginid &"','"& varawp &"','"& seldish("catid")&"','"& seldish("minorheadcode")&"')")
where I have to return the success or error message
presently I am storing it as a session vairable session("message")= " Records Successfully Inserted"
How to display the success message?