jquery - Retrieving POST data from Ajax in ASP Classic -


i'm trying post values ajax/jquery , print out in asp classic.

when check network tab in developer tools shows delete_id , tbl posted values dont display in code.

<script> $(document).ready(function(){  $('input#del-policy').click(function(){     var element = $(this);     var del_id = element.attr("name");     var info = "delete_id=" + del_id + "&tbl=policies";     if(confirm("are sure want delete entry?"))     {      $.ajax({        type: "post",        url: "admin.asp",        data: info,        success: function(){          }        });         $(this).parent().parent().fadeout("slow", function() {          $(this).remove();        });      }     return false;   });  }); </script>  <% dim i = request.form("tbl") response.write(i) %> 

try this:

$(document).ready(function(){  $('input#del-policy').click(function(){  var element = $(this);  var del_id = element.attr("name");  var info = "delete_id=" + del_id + "&tbl=policies"; if(confirm("are sure want delete entry?")) {  $.ajax({    type: "post",    url: "admin.asp",    data: info,    success: function(response){       $("#yourcontrolid").val(response); //this trick    }    });     $(this).parent().parent().fadeout("slow", function() {      $(this).remove();    });  }  return false;  });  }); 

asumming admin.asp

<%   = request("tbl")   response.write(i) %> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -