Timeline for WordPress Sending data to Ajax with select option
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 13, 2021 at 11:16 | comment | added | Ferhat | thank you very much, finally i got the code block i wanted. have a nice day :) | |
Aug 13, 2021 at 11:15 | comment | added | Buttered_Toast |
That is the problem, .append() adds to the end of the element, while .html() replaces all the html with what you have passed it
|
|
Aug 13, 2021 at 11:11 | comment | added | Ferhat | $('#ilce').append(e) i use, I have to reset the values of the counties every time | |
Aug 13, 2021 at 10:59 | comment | added | Buttered_Toast |
@Ferhat Probably your JS, do you still use $('#ilce').html(e); ? or did you switch to $('#ilce').append(e);
|
|
Aug 13, 2021 at 10:58 | comment | added | Ferhat | yes it is true but if i choose another province the other districts are still standing and all the districts are overlapping | |
Aug 13, 2021 at 10:54 | comment | added | Buttered_Toast | @Ferhat From what I see you first need to select a province, after you selected a province the ajax runs and returns the options for district, is this correct? | |
Aug 13, 2021 at 10:35 | vote | accept | Ferhat | ||
Aug 13, 2021 at 10:25 | comment | added | Ferhat | I added it now you can check it | |
Aug 13, 2021 at 10:13 | comment | added | Buttered_Toast | @Ferhat I have no idea what is province and district in your code, could you maybe add it to your question? | |
Aug 13, 2021 at 10:12 | comment | added | Ferhat | Thank you very much for the nice information you provided, the code is working, but I have one last question. I choose the province and district. When I choose the first province, the districts come without any problems, but when I choose the second province, this time it overlaps the other districts, what can I do? | |
Aug 13, 2021 at 7:53 | history | answered | Buttered_Toast | CC BY-SA 4.0 |