daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Jul 19th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getusersbyselectedrole() {
  2.                 alert(role_filter);//check to be sure data is being collected
  3.                 alert("{role :"" + role_filter + ""}"); //check to be sure the ride data is being sent to serve
  4.                 alert("<%= ReportsLink %>/LoadUsersByRole");//check to be sure the right service address is being used
  5.                 $.ajax({
  6.                 type: "POST",
  7.                     url: "<%= ReportsLink %>/LoadUsersByRole",
  8.                     data: "{role :" + role_filter + "}",
  9.                     contentType: "application/json; charset=utf-8",
  10.                     dataType: "json",
  11.                     success: function(msg) {
  12.                         $("#<%= sUsers.ClientID %>").append($("<option></option>").attr("value", "-1").text("select user"));
  13.                         $.each(msg, function(key, value) {
  14.                             $("#<%= sUsers.ClientID %>").append($("<option></option>").attr("value", key).text(value));
  15.                         });
  16.                     },
  17.                     error: function(res, status) {
  18.                         if (status === "error") {
  19.                             // errorMessage can be an object with 3 string properties: ExceptionType, Message and StackTrace
  20.                             var errorMessage = $.parseJSON(res.responseText);
  21.                             alert(errorMessage.Message);
  22.                         }
  23.                     }
  24.                 });
  25.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top