I have a problem getting Ajax to work with Framework7, below is what I have when using javascript, understandably there are some changes in V2 and ive looked at myApp.request.postJSON - but I just get error messages , below is the original that im trying to convert - thanks in advance.
$.ajax({
type: “POST”,
url: localStorage.remoteURL,
dataType: “json”,
data: { fname: Rfname, lname: Rlname, email: Remail },
success:function(data)
{
if(data.status == 'success'){
alert(("A registration link has been sent to your email address"));
window.location.replace("login.html");
return;
}
else if(data.status == 'T'){
alert(("That email address has already been registered, please login."));
window.location.replace("login.html");
return;
}
}
,
fail: function(data)
{
alert("Registration failed");
return;
}
, error:function(x,e) {
alert("Error");
}
}
);