Facebook
From Alexander Toropovsky, 6 Years ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 265
  1.  
  2.  
  3.         //document.getElementsByClassName("additional-photos").onclick = function () { MakeNextVisible(this) };
  4.         $(function () {
  5.             $("#check_availability").click(function (e) {
  6.                 var form = $("#meetingForm").serialize();
  7.                 console.log(form);
  8.                 var myData = [{ Time: form }];
  9.                 var status = '';
  10.             $.ajax({
  11.                 url: "@Url.Action("CheckTimeAvailability", "Home")",
  12.                 type: "GET",
  13.                 dataType: "text/html",
  14.                 contentType: 'application/json',
  15.                 data: form,
  16.                 success: function (resp, status, xhr) {
  17.                     status = resp.result;
  18.                     alert(msg);
  19.                     console.log(response);
  20.                 },
  21.                 error: function (textStatus) {
  22.                     alert(textStatus);
  23.                 }
  24.                 });
  25.             alert(status);
  26.             console.log("status is:"+status);
  27.         });
  28.     })
  29.  
  30. //Po stronie kontrolera:
  31.  
  32.  public void CheckTimeAvailability(string Time, string Date)
  33.         {
  34.             var meetingData = _context.Meetings.Select(m => m).ToArray();
  35.             var res = "res";
  36.             foreach (var meeting in meetingData)
  37.             {
  38.  
  39.             }
  40.             Response.Write(res);
  41.         }