1
I have a select that uses a script to fill the city field, through the selected state. The problem is that I need to add another select and when I add, only a select works.
<script src="http://cidades-estados-js.googlecode.com/files/cidades-estados-v0.2.js"></script>
<select id="estado" name="estado"></select>
<select id="cidade" name="cidade"></select>
<br/>
<select id="estado1" name="estado1"></select>
<select id="cidade1" name="cidade1"></select>
<script type="text/javascript">
window.onload = function() {
new dgCidadesEstados(document.getElementById('estado'), document.getElementById('cidade'), true);
}
</script>
<script type="text/javascript">
window.onload = function() {
new dgCidadesEstados(document.getElementById('estado1'), document.getElementById('cidade1'), true);
}
</script>
@I have 2 selects where I select the state, and when selecting the state, I select the cities of that state. But when adding the second, only ONE works.
– Randrade