1
I’m having difficulty making the code below work, I need when selecting a city, this was redirected to a particular page.
Below follows the code I’m trying to use:
Javascript:
<script type="text/javascript" src="http://pastebin.com/raw.php?i=Qi2BcFsP"></script>
<script type="text/javascript">
window.onload = function() {
new dgCidadesEstados({
estado: document.getElementById('estado'),
cidade: document.getElementById('cidade'),
estadoVal: '<%=Request("estado") %>',
cidadeVal: '<%=Request("cidade") %>'
});
}
</script>
HTML:
</head>
<body>
<form id="sistema" name="sistema" method="post" action="">
<label>Estado</label>
<select id="estado" name="estado"></select>
<label>Cidade</label>
<select id="cidade" name="cidade"></select>
</form>
</body>
Alex in my answer in the other question did not help? You saw that I edit it?
– Guilherme Nascimento
I had great difficulty. And with this code I was able to easily insert or remove cities and states. I don’t know where I’m going wrong.
– ALEX BROOK
There are two codes in the answer is the last, I will post here.
– Guilherme Nascimento
With this code there I did everything and it worked out.. I just need to redirect now is.
– ALEX BROOK
the code there in the answer does just that, writes, I can’t understand, you didn’t see the update? All right, follow the answer with the example of redirect copied from another answer. To test the code in the answers click on "Execute code snippet"
– Guilherme Nascimento