Plugin use of ajax/jquery depending dropdown


i am looking for an example on which implements two depending dropdowns. There are a zillion examples on the internet but they are not working within wordpress plugin. So this is what if have

In the JS File

        var val =  $(this).val();
            type: 'POST',
            url: 'reuse/get-contacts.php',
            success: function(data){
            error: function(xhr, status, error) {

for some reason it cannot find the URL php file get-contacts.php. It is located in a subfolder folder from the page file


I have tried tgo put them all in the same folder, Changed the folder with ./ or ../../ or just / Nothing seems to work.

SO i am in a wordpress plugin. On mypage i have two dropdowns from which the second one should filtered data based on the selection of the first one. How do i managed this in a wordpress plugin.

Thanks for your time, marcel

, , , Marcel Vreuls 5 months 0 Answers 96 views 0

Leave an answer