Page 1 of 11
Forum moderator: bigblog 
uCoz Community » For Webmasters » Custom Solutions » post uapi
post uapi
aligassan
Posts: 4
Reputation: 0

Message # 1 | 5:42 PM
hi guys ,

i want make query Methods POST uapi . ex , like facebook or twitter , i just want make jquery post , but i dont know how program , any one have example ?

thanks
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 3:12 PM
Moved to Custom Solutions.
I'm not active on the forum anymore. Please contact other forum staff.
VZ
Posts: 189
Reputation: 3

Message # 3 | 7:50 PM
aligassan, http://api.jquery.com/jquery.post/
Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
aligassan
Posts: 4
Reputation: 0

Message # 4 | 8:18 AM
thank you , for replying , can you please give me example , ? i mean jquery already just past in html my website . thanks
VZ
Posts: 189
Reputation: 3

Message # 5 | 1:24 AM
Quote aligassan ()
can you please give me example

Code
function loginsub() {
    $(".login-progress").addClass("checking");
    usr = $("#usrnm").val();
    pswd = $("#pswd").val();
    $("#usrnm,#pswd").prop("disabled", true);
    $.ajax({
   type: "POST",
    url: "/index/sub",
    data: {user:usr, password:pswd, a:2, ajax:1, rnd:0},
    success: function(data) {
  var result = $(data).find("cmd[p=\"innerHTML\"]").text();
  $("#resultsappd").html(result).css("display","none");
  var errorc = $("#resultsappd div .myWinLoadSF").attr("title");
  var successc = $("#resultsappd div div").hasClass("myWinLoadSD");
  console.log(successc);
  if(successc == true) {
   $(".login-progress").removeClass("checking");
   $(".login-progress").addClass("success");
   location.reload();
  } else if(errorc == "Your IP address has been temporarily blocked" || "Wrong username or password") {
   $(".login-progress").removeClass("checking");
  } else {
   $(".login-progress").removeClass("checking");
  }
  $("#usrnm,#pswd").prop("disabled", false);
    },
    error: function(e) {
  $(".login-progress").removeClass("checking");
  console.log("Connection Issue");
    },
    dataType: "xml"
});
    return false;
}

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
aligassan
Posts: 4
Reputation: 0

Message # 6 | 4:24 PM
thank you very much , what about coding call html ? can make post direct ?
VZ
Posts: 189
Reputation: 3

Message # 7 | 6:22 PM
Quote aligassan ()
what about coding call html ? can make post direct ?

Do you mean when you submit a request to call on this function?

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Post edited by VZ - Saturday, 2016-03-26, 6:23 PM
uCoz Community » For Webmasters » Custom Solutions » post uapi
Page 1 of 11
Search: