Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Call ajax in onsen UI How?



  • Hello Guys,
    I am new in this Onsen ui.
    I want to know how to call ajax in onsen ui same as the below code, same is working fine in html but no in Onsen.
    Please tell me how to call.

    var person = {}
    person[“ContactNo”] = “9428299999”;
    person[“Pwd”] = “123”;
    alert(JSON.stringify(person));
    $.ajax({
    url: “http://voting.somee.com/api/AjaxAPI/LoginAuth”,
    type: ‘post’,
    dataType: ‘json’,
    //contentType: ‘application/json’,
    data: person,
    success: function (data) {
    var myJSON = JSON.stringify(data);
    alert(myJSON);
    },
    error: function (response) {
    alert(response.responseText);
    }

            });