0
Good Morning I’m trying to make this example in my project. It’s a simple change of Select when you choose State Change Cities in another Select.
https://gist.github.com/ografael/2037135
But I can’t find the variable, estados_cidades.json
.
I tried to bring as script
<script id="estados_cidades.json" src="GerenciaTI/Scripts/estados_cidades.json" ></script>
But he doesn’t bring the data through Jquery
I’m doing on JSP pages, what mistake I made ?
Or if there’s a better way to do it.
Yes it worked, but then you’re pulling their link Online.
– Arthur Edson
But to pull Local ????
– Arthur Edson
just save the JSON locally and pull it, can’t do so? I’ll put together an example
– Rafael Augusto
this, please
– Arthur Edson
Here it worked, Voce can place the entire link of the saved file locally. Ex: your file is saved inside the json folder. would look like this. $. getJSON('http://localhost/MEUPROJETO/json/estados_cidades.json'
– Rafael Augusto
Great, it worked thanks. Just one last question about this code. By which intendi he assigns the value of the right states, I’m pulling request.getParameter("states") and it usually comes now when I request.getParameter("cities") it brings null in Servlet ? the onchagen event only changes the value of states
– Arthur Edson
If it worked could mark my answer? in this case, You need to do logic again
– Rafael Augusto
i am very slow even ta all right thanks Rafael, I put the wrong name on the variable kkkk
– Arthur Edson