Ajax does not work in Internet Explorer 6

-2
<html>
<head>
    <meta charset="utf-8">
    <title>AJAX, JSON E PHP</title>
    <script type="text/javascript" charset="utf-8"></script>

</head>
<body>
    <select name="secoes" id="secoes" style="font-weight:bold;width:100%">
    <option>Selecione...</option>
        <option value="25" id="25">Hortifrutti</option>
        <option value="15" id="15">Peixaria</option>
    </select>       



    <select id="itens" name="itens" style="width:100%; font-weight:bold;">
    <option>Selecione...</option>
    <option value=""></option>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script>$(document).ready(function(){$('#secoes').change(function(){$('#itens').load('dados.php?secao='+$('#secoes').val());});$('#itens').change(function(){varValor=$('#itens').val();if(Valor!=''){$('#tabela').load('dados.php?ean='+$('#itens').val());}});});</script></body>

IreturnPHP

<head><?phpheader('Content-type:text/html;charset=utf-8');?><metahttp-equiv="Content-Type" content="text/html" charset="utf-8" />
<? require_once('bd.php'); ?>
</head>
<body>
<?php 
    //header('Content-Type: text/html; charset=utf-8');
    $SecaoPadrao = $_GET['secao'];
    $eanselecionado = $_GET['ean'];
    if($secao!= ''){
        mysql_set_charset('utf8');
        $query = mysql_query("SELECT * FROM ConferenciaCeasa where secao ='$SecaoPadrao' and ForaLinha!='*' order by descricao asc");
        echo "<option>Selecione...</option>";
            while($row = mysql_fetch_array($query)){
                echo "<option value='".$row['ean']."'>".$row['descricao']."</option>";
            }
    }elseif($eanselecionado!= ''){
        $query = mysql_query ("select TaraQuantidade,TaraTroca from ConferenciaCeasa WHERE ean like '$eanselecionado'");
            while($row = mysql_fetch_array($query)){
                echo "<input type='text' style='width:100%;display:<?echo $mostra;?>' value='".$row['TaraQuantidade']."' id='tara-quantidade' name='tara-quantidade' onblur='CalculaCaixa();' onfocus='this.select()'></input>";
            }
    }



?>

</body>
</html>
    
asked by anonymous 08.05.2017 / 15:30

1 answer

2

From jQuery 2 there is no longer support for IE 6/7/8 browsers and maybe some things will not work on Android 2 and Internet Explorer 9 as stated in link

To resolve you can try jQuery 1.x , download these:

It should look like this:

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script><script>$(document).ready(function(){$('#secoes').change(function(){$('#itens').load('dados.php?secao='+$('#secoes').val());});$('#itens').change(function(){varValor=$('#itens').val();if(Valor!=''){$('#tabela').load('dados.php?ean='+$('#itens').val());}});});</script>

NotethatyoucanfollowthejQuery1updatehere: link

    
08.05.2017 / 18:39