How to solve the error "illegal conversion"?

Such a problem: when I choose search by address and click the button, it POPs up this error:
5cf2d43a6cfc7310371654.png
Swears by AJAX.
5cf2d50ec55d1886099050.png
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
the <script>
 $(document).ready(function() {
 buttonSearch.addEventListener("click", () => {
 let searchname_value = document.querySelector(".search-name").value
 searchselect_value = document.querySelector(".search-value").selectedIndex,
 searchstreet_value = document.querySelector(".search-street").value
 searchhnum_value = document.querySelector(".search-hnum");
$.ajax({
 url: "data-search.php",
 type: "POST",
 cache: false,
 data: {
 ajax: 'yes'
 searchname_value: searchname_value,
 searchselect_value: searchselect_value,
 searchstreet_value: searchstreet_value,
 searchhnum_value: searchhnum_value
},
 success: function(data) {
console.dir(data);
 document.querySelector(".output-search").innerHTML = data;
}
});
});
 }); 
</script>
</body>

</html>
March 23rd 20 at 18:42
1 answer
March 23rd 20 at 18:44
Try to reconnect the library with such reference
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js


You are using JQuery.ready function which use the JavaScript addEventListener, which use $.ajax. This "trick" is that? Actually it and swears $.ajax.

And it does not need switches function, as you are no context is not caused, so get those show-off.
Try to reconnect the library with such reference

And? What does it mean? jQuery your link any different?
You are using JQuery.ready function which use the JavaScript addEventListener, which use $.ajax. This "trick" is that?

Yes, this code looks weird if I use jq, the writing is already on jq, but he is technically working.
Look at how the method ready if you are confused by this point.
Actually it and swears $.ajax.

In fact, the matter is not in it :)
And it does not need switches function, as you are no context is not caused, so get those show-off.

On your dial f-I is used only to solve problems with context? Let us then do abandon es6, all specification is nothing but "show-off" in the form of syntactic sugar. - Damion_Ferry76 commented on March 23rd 20 at 18:47

Find more questions by tags JavaScriptAJAX