I am working with osclass. Having problem with searching. I use a simple Jquery function. When I change my category it will gonna submit my query instantly. and it works. But this search.php
will save this query. So, if I changed my category again, it gives me an error (there is no result). But again if I refresh this page, and change my category, then it works!
Here is my code :
$("#categ").change(function(){
$("#formulario123").submit();
});
So, how can I clear this (html or query), while every time I change my category, before submitting search button?
Please, any suggestions. Thanks in advance
If I understand you correct, your form i submittet to another target, which means that your category dropdown stays on the selected option. An now if you select the same option again the form is not submittet. If that is what you mean, then the reason for this is that the change-event is not fired, because the dropdown is not changed, it stays on the same option.
Again if I understand you correct, you want to clear the dropdown selection after submit, correct? One way of doing so could be like this:
$("#categ").change(function(){
$("#formulario123").submit();
$("#categ").val("");
});