3
I have a code and I want it to clear a path in iframe
when I click on a option
of select
. I managed to do this, but to change the option so that it opens something else on iframe
i have to refresh the page. If I click on one and then want to change to another it does not happen.
I’ll paste the code so you can take a look:
<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/">opção2</option>
</select>
</form>
<iframe id="abrir" name="abrir" scrolling="auto" src=""></iframe>
You are checking whether the iframe src actually gets value when trying the second time?
– Leandro Curioso