Jaber Ahmad
asked on
Send multiple values with jQuery [ input_id: $(this).val() ]
Good evening experts!
I would like to send in addition to code_sms: $(this).val() a second value sel_reference: $(this).val() but I can not. I am using this piece of code to launch a search query for a value in my table, only with one criterion, or I need to put several of them.
Can you help me please ?
Here is my code
I would like to send in addition to code_sms: $(this).val() a second value sel_reference: $(this).val() but I can not. I am using this piece of code to launch a search query for a value in my table, only with one criterion, or I need to put several of them.
Can you help me please ?
Here is my code
$("#mask_codes").keyup(function(e) {
if(document.getElementById("mask_codes").value.length > 5 ) {
$("#verif_ico").html("<i class='fal fa-spinner fa-pulse text-info'></i>").fadeIn("slow");
$.post("_check-sms.php", {
code_sms: $(this).val()
}, function(datas){
if (datas == 'yes') {
$("#verif_ico").show();
$("#verif_ico").fadeTo(200, 0.1, function() {$(this).html("<i class='fas fa-check text-success'></i>").fadeTo(900, 1);});
$("#btn_confirmer").attr("disabled", false);
} else {
$("#verif_ico").show();
$("#verif_ico").fadeTo(200, 0.1, function() {$(this).html("<i class='fas fa-ban text-danger'></i>").fadeTo(900, 1);});
$("#btn_confirmer").attr("disabled", true);
}
});
}
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great, - that was not obvious from the information in the original question
ASKER
Yes I guess, I'm really sorry, Ajax and I really don't get along "yet", but it's going to be fine.
Thank you again for your help, I will try to be more explicit next time and yes your answer has helped me a lot!
Thank you again for your help, I will try to be more explicit next time and yes your answer has helped me a lot!
ASKER
Open in new window