I have a code and I want it to open a path in iframe
when I click on a option
of select
. I was able to do this, however to change the option so that it opens something else in iframe
I have to refresh the page. If I click on one and then want to switch to another it does not happen.
I'll paste the code for you guys to take a look at:
<form>
<select name="Exames" onChange="abrir.location = options[selectedIndex].value">
<option label="Selecione sua opção" value="0"></option>
<option value="https://www.youtube.com/?gl=BR&hl=pt">opção1</option>
<option value="https://www.google.com.br/">opção2</option>
</select>
</form>
<iframe id="abrir" name="abrir" scrolling="auto" src=""></iframe>