This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Gilou26

  • **
  • 11 posts
Start search without clicking on the magnifying glass
« on: October 12, 2019, 03:00:45 PM »
Hello.
Is it possible that the search will start automatically as soon as a category has been selected (without having to click on the magnifying glass).
Thank you in advance for your help.

Osclass 3.8.0 / Osclasswizards 2.0.6

*

MB Themes

Re: Start search without clicking on the magnifying glass
« Reply #1 on: October 12, 2019, 04:24:02 PM »
It's just jquery code that will be binded to category field, you could quickly find it on stackoverflow
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Gilou26

  • **
  • 11 posts
Re: Start search without clicking on the magnifying glass
« Reply #2 on: October 12, 2019, 05:44:29 PM »
Thank you for your answer.
I've never used stackoverflow, I've looked but I'm having trouble doing my research (my English is not very good).
Can you tell me how to find the right jQuery code and what to change on it?
Thank you in advance.

Marked as best answer by frosticek on October 14, 2019, 09:40:21 PM
*

MB Themes

Re: Start search without clicking on the magnifying glass
« Reply #3 on: October 14, 2019, 09:27:02 AM »
@Gilou26
Something like:
Code: [Select]
$(document).ready(function() {
  $('body').on('change', 'select[name="sCategory"]', function(e) {
    $(this).closest('form').submit();
  });
});
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Gilou26

  • **
  • 11 posts
Re: Start search without clicking on the magnifying glass
« Reply #4 on: October 14, 2019, 06:30:09 PM »
Hello.
Great, it works very well.
Thank you very much for your help.

*

MB Themes

Re: Start search without clicking on the magnifying glass
« Reply #5 on: October 14, 2019, 09:40:30 PM »
Welcome
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots