-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>
Curiosity: what is your need to still use IE6?
– Woss
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
– MarceloBoni
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.
– Raizant