Advertisement
carlosfigueira

SO_8537634 - htm

Dec 16th, 2011
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.85 KB | None | 0 0
  1.     <script type="text/javascript">
  2.         function StackOverflow_8537634_Test() {
  3.             var url = "/StackOverflow_8537634.svc/SaveUserData";
  4.             $.ajax({
  5.                 type: "POST",
  6.                 contentType: "application/json; charset=utf-8",
  7.                 url: url,
  8.                 data: '{"userInfo":{"EmailID":"praveen", "LevelID": 1}}',
  9.                 dataType: "json",
  10.                 processData: false,
  11.                 success: function (data, textStatus, jqXHR) {
  12.                     $("#result").text(data);
  13.                 },
  14.                 error: function (jqXHR, textStatus, errorThrown) {
  15.                     $("#result").text("error");
  16.                 }
  17.             });
  18.         }
  19.     </script>
  20.     <input type="button" value="Click Me" onclick="StackOverflow_8537634_Test();" />
  21.     <div id='result'></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement