Jump to content

wrb

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

0 Neutral

About wrb

  • Rank
    Newbie
  1. Anyone have any suggestions? In the code below returns with error when taking delete a table record: SCRIPT: $("#add").click(function () { $.ajax({ url: '@Url.Action("AddProduto", "Produto")', type: "POST", data: $('#formprod').serializeArray(), success: function (data) { if (data.success) { $('#tabelaproduto > tbody:last').append('<tr style="font-size:10px">' + '<td hidden>' + data.id + '</td>' + '<td>' + data.descricao + '</td>' + '<td>' +
  2. Anyone have any suggestions? In the code below returns with error when taking delete a table record: SCRIPT: $("#add").click(function () { $.ajax({ url: '@Url.Action("AddProduto", "Produto")', type: "POST", data: $('#formprod').serializeArray(), success: function (data) { if (data.success) { $('#tabelaproduto > tbody:last').append('<tr style="font-size:10px">' + '<td hidden>' + data.id + '</td>' + '<td>' + data.descricao + '</td>' + '<td>' +
  3. How do I get the selected datepicker below and populate a label? @Html.JQueryUI().Datepicker("data1", null, new { id = "data1", @class = "form-control" })
  4. wrb

    Return ages.

    From a textbox with the date of birth as return label in ages in weeks, months and years.
  5. How can I make the DropDownList appear only item from a particular id = Med_Produto? Controller: ViewBag.cod_Med= new SelectList(db.Prod_Med, "id", "descricao"); View: @Html.DropDownList("cod_Med", null, String.Empty, new { id = "Med_Produto", name = "cod_Med", @class = "form-control" }) Example: id> 38
  6. I need to return 2 places after the comma: $("#preco2").val(preco * percent); From: 57.15000000 for: 57.15
  7. How do I return with 2 places after the comma?
  8. Hi, how to calculate a percentage increase? I have 3 fields to when entering a value in the second the third returns with the result. I tried the code below, but nothing appears on preco2 field. <div class="editor-field col-md-7"> @Html.TextBoxFor(model => model.preco1, new { id = "preco1", name = "preco1", @class = "form-control" }) </div> <div class="editor-field col-md-7"> @Html.TextBoxFor(model => model.percentual, new { id = "percentual"
  9. Yes, when the select has only one item.
  10. See It. The graph is right, the URL this right. The problem is the event when the select receives a graphic value must render. In fact I do not know if the path is with the post code. Lack knowledge in JavaScript...
  11. I changed the code because I did not find the error ... The "onchange" sends the value and renders the chart. The URL is correct, it is the place of animals I put 1 for example, the chart is rendered.
  12. I was with an event in select "onchange" as below, but in the select has only one item I not I the desired effect. I need to render the chart being the select filled. <form action=""> @Html.DropDownList("cod_animal", null, new { onchange = "drawchart(this.value)", Name = "cod_animal", id = "cod_animal", @class = "form-control" }) </form> <script type="text/javascript"> google.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(function(){drawchart('')}); function drawchart(c
  13. 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
×
×
  • Create New...