uma parte do form :
<td width="10"><input type="checkbox" name="cod_produto[]" value="<? echo "$cod_produto"; ?>"> </td> <td><? echo "$produto"; ?></td>
se eu uso o action vai tudo firmeza se eu uso o link qu faz abrir uma pagina na div , ai meleca tudo .
<html>
<head>
<link href="css/estilo.css" rel="stylesheet" type="text/css">
<script>
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
function antiCacheRand(aurl){
//Adiciona um parametro randomico à querystring.
var dt = new Date();
if(aurl.indexOf("?")>=0){// já tem parametros
return aurl + "&" + encodeURI(Math.random() + "_" + dt.getTime());
}else{ return aurl + "?" + encodeURI(Math.random() + "_" + dt.getTime());}
}
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest){ // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
} else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch {
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch {
}
}
} else {
return false
}
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
url = antiCacheRand(url);
page_request.open('GET', url, true)
page_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML = unescape(page_request.responseText.replace(/\+/g," "));
}
</script>
</head>
<body >
<form name="orcamento" action="total_preco.php" method="POST">
<table class="texto">
<?
$categoria = $_POST["categoria"];
include("conexao.php");
$conexao = new Conexao;
$conexao -> Conecta("produto");
$res = mysql_query(" Select * FROM produto ORDER BY categoria Desc ");
$i=0;
while($dados = mysql_fetch_array($res)) {
$cod_produto = $dados["codigo_produto"];
$produto = $dados["produto"];
$preco = $dados["preco"];
$categoria = $dados["categoria"];
$conteudo .= $produto. ": R$ " .$preco. "<br>";
$teste[$i] = $categoria;
?>
<tr>
<td> <? if($categoria != $teste[$i-1] ) { echo" $categoria "; } ?></td>
</tr>
<? ?>
<tr>
<td width="10"><input type="checkbox" name="cod_produto[]" value="<? echo "$cod_produto"; ?>"> </td> <td><? echo "$produto"; ?></td>
</tr>
<?
$i++;
}
?>
</table>
<br><br>
<input type="submit" name="submit" value="Enviar Orçamento" class="texto" >
<a href="java script:ajaxpage('total_preco.php', 'conteudo');">History </a>
<input type="hidden" name="cod_produto" value="<? echo"$cod_produto"; ?>">
<div id="conteudo"></div>
</form>
</body>
</html>
total_preco.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br"
lang="pt-br">
<head>
</head>
<body>
<?
$categoria = $_POST['cod_produto'];
echo " $categoria ";
?>
</body>
</html>
ainda nao foi resolvido :9
Real Madruga paga em dia os jogadores mas deve 14 meses de alugel .