Ajax does not work in Internet explorer 6

Asked

Viewed 348 times

-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(){
            var Valor = $('#itens').val();
            if(Valor != ''){
        $('#tabela').load('dados.php?ean='+$('#itens').val() );
            }
    });

});
</script>
</body>

Retoro PHP

<head>
    <?php header('Content-type: text/html; charset=utf-8'); ?>
    <meta http-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>
  • 3

    Curiosity: what is your need to still use IE6?

  • 1

    Difficult (if not impossible) to see people still using IE6.... It works more or less like Safari in windows, there is not much sense trying to keep adjusting in all browsers, especially the old ones, a site that is 100% compatible in all browsers is something unreachable because the list of browsers existing, and the list of different implementations is huge

  • 1

    I can’t speak for the author of the question, but until recently (3 months) the call center companies I worked on used IE6 as a single browser, in addition to the old beloved windows Xp. There’s a lot of prehistoric companies out there.

1 answer

2


Of jQuery 2 from now on there is no more support for IE 6/7/8 browsers and maybe some things don’t work in Android 2 and Internet Explorer 9, as said in https://blog.jquery.com/2013/04/18/jquery-2-0-released/

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

Should stay 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(){
            var Valor = $('#itens').val();
            if(Valor != ''){
        $('#tabela').load('dados.php?ean='+$('#itens').val() );
            }
    });

});
</script>

Note that you can follow the jQuery1 update here: https://code.jquery.com/jquery/#jquery-all-1.x

  • 1

    Thank you Brother !!!!! solved my problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.