Cita:
Iniciado por David el Grande
header() no puedes usar después de haber enviado una salida al navegador. El metatag debe estar en el head, y debes especificarle algunos segundos de retardo, de lo contrario va a redireccionar antes de que puedas ver el contenido.
la funcion la puse en el head y con tiempo 1 pero sigue isn andar, el codigo esta asi:
Código PHP:
<?
ob_start();
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<?
$id = $_GET["id"];
//
?>
<script>
function checkSubmit() {
document.getElementById("btsubmit").value = "Enviando...";
document.getElementById("btsubmit").disabled = true;
window.open('comprobante.php?id=<?php echo $id; ?>', 'windowname1', 'width=400, height=400');
<meta HTTP-EQUIV="Refresh" CONTENT="0;URL=actualiza_pagos.php?id="<?php echo $id; ?>"&efectivo="<?php echo $_POST["efectivo"]; ?>>;
return true;
}
//estas son funciones para ver o no algunos div
function mostrar_cheques()
{
var cheque = document.getElementById("cheque").value;
if(cheque == '')
{
document.getElementById("banco_cheque").style.visibility = 'hidden';
document.getElementById("bancoemisor").style.visibility = 'hidden';
document.getElementById("num_ch").style.visibility = 'hidden';
document.getElementById("numero").style.visibility = 'hidden';
}else
{
document.getElementById("banco_cheque").style.visibility = '';
document.getElementById("bancoemisor").style.visibility = '';
document.getElementById("numero").style.visibility = '';
document.getElementById("num_ch").style.visibility = '';
}
}
function mostrar_tarjeta()
{
var tarjeta = document.getElementById("tarjeta").value;
if(tarjeta == '')
{
document.getElementById("divtarjeta").style.visibility = 'hidden';
document.getElementById("cuotas").style.visibility = 'hidden';
}else
{
document.getElementById("divtarjeta").style.visibility = '';
document.getElementById("cuotas").style.visibility = '';
}
}
</script>
</head>
el problema puede ser que mezcle el php con meta tag?