i have a form and i want to submit it to a webservice,
i tried this:
if (errorCount == 0) {
var mobileNumber = $("#iMobileNumber").val();
var password = $("#iPassword").val();
$.post("http://localhost:8080/test2/eattel/customers/loginWeb/" + mobileNumber + "/" + password, $('#fLogin').serialize(), function (data) {
alert(data);
});
}
but when i submit the form i just get the old url + question mark.
what am i doing wrong please?
thanks in advance
i can alert the password and the mobilenumber so the code is exclusive correctly
According to your code the url is like
http://localhost:8080/test2/eattel/customers/loginWeb/mobileNumber/password
so try the below thing
$.post("http://localhost:8080/test2/eattel/customers/loginWeb", mobileNumber + password, $('#fLogin').serialize(), function (data) {
alert(data);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.