Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function calculate() {
- var period = $('#h1').val();
- var amount = $('#h2').val();
- $.post({
- url: '@Url.Action("GetPrices", "Dashboard")',
- type: "POST",
- dataType: "json",
- contentType: 'application/json; charset=utf-8',
- cache:false,
- data: JSON.stringify({ pe: period, am: amount }),
- success: function (response) {
- var values = JSON.parse(response);
- $('#priceValue').html(values[0]);
- $('#lengthValue').html(values[1]);
- $('#dateValue').html(values[2]);
- $('#totalValue').html(values[3]);
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- alert(textStatus + errorThrown);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement