troubleshooting Question

Send multiple values with jQuery [ input_id: $(this).val() ]

Avatar of Ahmad Jaber
Ahmad JaberFlag for Côte d'Ivoire asked on
jQuery
4 Comments1 Solution12 ViewsLast Modified:
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
$("#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
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros