On one website from where I'm doing scraping there is a new dropdown like the one below:
<select class="genericInput regular-16-important ng-pristine ng-valid ng-not-empty ng-touched" data-ng-change="changeOrdinamento(ordinamento)" name="singleSelect" id="singleSelect" data-ng-model="ordinamento" style="border-left: white">
<!-- //m.n.q evoluzione ricerche blocco 1 inizio -->
<!-- ngIf: tipoRicercaIniziale ==1 || tipoRicercaIniziale ==2 --><option ng-if="tipoRicercaIniziale ==1 || tipoRicercaIniziale ==2" value="rilevanza" class="ng-scope">RILEVANZA</option><!-- end ngIf: tipoRicercaIniziale ==1 || tipoRicercaIniziale ==2 -->
<!-- //m.n.q evoluzione ricerche blocco 1 fine -->
<option value="fornitore">FORNITORE</option>
<option value="nomeCommerciale">NOME</option>
<option value="price">PREZZO</option>
</select>
The default value is "rilevanza" but I want to automatically switch it to "price".
If I'm clicking with the mouse on the dropdown and then on price, the content of the page it's reloading for be filtered for price (from cheaper to higher price).
If I'm typing in the console:
document.getElementById("singleSelect").selectedIndex = 3;
The value of the dropdown is correctly updating but the page content is not reloading.
There is probably something missing? Some validation to do? PS: I'm not a Javascript dev, I'm iOS Dev.