HTTP request for event with (jQuery?)

I have a selected form with several parameter values, and I want the page to reload when someone selects a different parameter value, without having a submit button. Just reload the page when someone changes the value. I would like to skip fetching data using an AJAX request. Therefore, the idea here is to call an HTTP request when the parameter value changes. I thought jQuery would be a good way to do this, but maybe there is another way.

So the question is:

How to call an HTTP request in case someone changes the value in the selection form without the submit button?

+3
source share
1 answer
$('#selectId').change( function(){
  document.location.href = '/newUrl';
});
+4
source

Source: https://habr.com/ru/post/1714492/


All Articles