Error calculating fields in IOS safari

0

I have a problem in developing a small calculation system where the user needs to put a value in a field and the system returns the results according to a specific account.

In all browsers for windows on computers and Android works correctly, however for safari in IOS the fields simply do not work. Is there any systemic imcompatibility about this?

Follow the code below:

<script>
jQuery('.simularparcela')[0].type = 'button';
jQuery(".simularparcela").click(function() {
var valorparcelas = jQuery(".valorparcela");
var parcelas = jQuery('input[name="meses[]"]:checked');
var valorparcela = valorparcelas[0].value;
var parcela = parcelas[0].value;
      jQuery.ajax({
        dataType: 'json',
        type : "POST",
        url: "http://www.mettaconsultoria.com.br/calculoparcela.php",
        data: { valorparcela: valorparcela, parcela: parcela, id: 1 },
        complete: function(result) {
        console.log(result);
          var json = JSON.parse(result.responseText);
          switch(json.code) {
            case 200:
            parcela = parcela.replace(/(d)(?=(ddd)+(?!d))/g, "$1.");
            jQuery('input[name="vlrCredito"]')[0].value = json.Credito;
            jQuery('#td_parcela_consorcio')[0].innerHTML = parcela;
            jQuery('#td_parcela_financiamento')[0].innerHTML = parcela;
            jQuery('#td_credito_consorcio')[0].innerHTML = json.Credito;
            jQuery('#td_credito_financiamento')[0].innerHTML = json.Credito;
            jQuery('#td_vlr_parcela_consorcio')[0].innerHTML = valorparcela;
        jQuery('#td_vlr_parcela_financiamento')[0].innerHTML = json.parcelaFinanciamento;
            jQuery('#td_totais_consorcio')[0].innerHTML = json.ValorSaldoDevedor;
            jQuery('#td_totais_financiamento')[0].innerHTML = json.financiamento;
            jQuery('#td_economia')[0].innerHTML = json.diferenca;
            jQuery('#comple_tabela')[0].hidden = false;
            jQuery('#tabela')[0].hidden = false;
            jQuery('.oculta').css("display","");
            jQuery('.info').css('display','');
            break;
            case 400:
            $(".overlap").hide();
            alert(json.msg);
            break;
          }
        }
      });
});
jQuery('.simular')[0].type = 'button';
jQuery(".simular").click(function() {
var creditos = jQuery(".credito");
var parcelas = jQuery('input[name="meses[]"]:checked');
var credito = creditos[0].value;
var parcela = parcelas[0].value;
      jQuery.ajax({
        dataType: 'json',
        type : "POST",
        url: "http://www.mettaconsultoria.com.br/calculo.php",
        data: { credito: credito, parcela: parcela, id: 1 },
        complete: function(result) {
        console.log(result);
          var json = JSON.parse(result.responseText);
          switch(json.code) {
            case 200:
            credito = credito.replace(/(d)(?=(ddd)+(?!d))/g, "$1.");
            jQuery('input[name="vlrParcela"]')[0].value = json.vlrParcela;
            jQuery('#td_parcela_consorcio')[0].innerHTML = parcela;
            jQuery('#td_parcela_financiamento')[0].innerHTML = parcela;
            jQuery('#td_credito_consorcio')[0].innerHTML = credito;
            jQuery('#td_credito_financiamento')[0].innerHTML = credito;
            jQuery('#td_vlr_parcela_consorcio')[0].innerHTML = json.vlrParcela;
        jQuery('#td_vlr_parcela_financiamento')[0].innerHTML = json.parcelaFinanciamento;
            jQuery('#td_totais_consorcio')[0].innerHTML = json.vlrSaldoDevedor;
            jQuery('#td_totais_financiamento')[0].innerHTML = json.financiamento;
            jQuery('#td_economia')[0].innerHTML = json.diferenca;
            jQuery('#comple_tabela')[0].hidden = false;
            jQuery('#tabela')[0].hidden = false;
            jQuery('.oculta').css("display","");
            jQuery('.info').css('display','');
            break;
            case 400:
            $(".overlap").hide();
            alert(json.msg);
            break;
          }
        }
      });
});
</script>
    
asked by anonymous 22.05.2017 / 15:01

0 answers