Jump to content

Search the Community

Showing results for tags 'select changed'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. In the code below I need to select an item in the "select" the graphic is rendered, how could implement this? @using (Html.BeginForm()){ @Html.AntiForgeryToken() @Html.ValidationSummary(true)<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 frm = document.getElementById('#animais'); var animais = frm.options[frm.selectedIndex].value; var url = '/Programa_Nutricao/Avaliacao/EvolucaoPeso/' + animais; $.get(url, {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); for (var i = 0; i < data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([ToJavaScriptDate(data[i].data_semanal), parseFloat(data[i].peso_kg)]); } var options = { title: 'Evolução do peso corporal', width: 700, height: 500, vAxis: { title: "PESO (kg)", minValue: 1, maxValue: 6 }, hAxis: { title: "DATA", textStyle: { fontSize: 10 } }, legend: { position: "none" } }; var chart = new google.visualization.LineChart(document.getElementById('EvolucaoPeso')); chart.draw(tdata, options); }); }</script> <div id="EvolucaoPeso" style="width: 900px; height: 500px;"></div>
×
×
  • Create New...