Jump to content

How could pass the selected item in a select the URL


wrb

Recommended Posts

How could pass the value of a selected item in a select in the url below to replace the 1:

<select id="animais" name="cod_animal" class="form-control"></select>
<script type="text/javascript">
google.load('visualization', '1.1', { 'packages': ['corechart'] });
google.setOnLoadCallback(drawChart);
function drawChart() {

var url = '/ Programa_Nutricao / Evaluation / EvolucaoPeso /' + 1;

Link to comment
Share on other sites

This is correct?

<script type="text/javascript">
google.load('visualization', '1.1', { 'packages': ['corechart'] });
google.setOnLoadCallback(drawChart);
function drawChart() {
var e = documento.getElementById("#animais");
var animais = e.opções[e.selectedIndex].valor;
var url = '/Programa_Nutricao/Avaliacao/EvolucaoPeso/' + animais;
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...