I have a dashboard with data filled from the database.
First, I have a Select working as a filter like
"select X from Y where fieldX = (The key from select goes here)"
and then the data from dashboard changes.
Currently, I'm using the onchange property. Right after the select is fired the dashboard changes without a submit button.
But now, I want to put more Selects (like 4, like a form). The problem is that right after a select is fired the dashboard changes. Not a problem with just 1 select (expected effect), but I want to select more Selects fields to add more filters on my dashboard like
"select X from Y where fieldX = (The key from selectX goes here) and fieldZ = (The key from selectZ goes here) and [...]"
(note that the user chooses the filters. Some selects fields may be selected or not)
My question if there is a way, using onchange (or not), to do that. Maybe using a submit button or something?
Currently I'm using something like this:
//PEGANDO O SELECT REGIONAL PARA O GRÁFICO
$('select#SELECTID').on('change', function (e) {
var SELECTID = this.value;
//url
control('ocupantes-aptos/dashboard?SELECTID =' + SELECTID , 'content');
});