Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

afoysal's avatar

Fire event for three drop down using jQuery

I have three drop down like below.

error

I would like to fire an event if any one or two or three of these three drop downs value selected using jQuery. These are not Cascading Drop down.

0 likes
2 replies
AddWebContribution's avatar

@afoysal you can add onchange event and in that you can get the data . check this link https://stackoverflow.com/questions/39953001/jquery-onchange-ajax

 $('.shop').change(function () {
        ...
        $.ajax({
            type: "POST",
            url: url,
            data: {'id': id}

        })
    });
 $('.month').change(function () {
        ...
        $.ajax({
            type: "POST",
            url: url,
            data: {'id': id}

        })
    });
  $('.date').change(function () {
        ...
        $.ajax({
            type: "POST",
            url: url,
            data: {'id': id}

        })
    });
1 like
afoysal's avatar

@saurabhd Thanks. Due to my poor English I couldn't express my self. Actually I would like to get some thing like below.

$('.shop').change(function () {
or
$('.month').change(function () {
or 
$('.date').change(function () {
// some jQuery code.
});

Please or to participate in this conversation.