Compatibility problem
Posted: Tue May 01, 2012 4:26 pm
Hi all!
I'm making a site with a div for advertising that swaps the ads (every 3 seconds) based on the name saved in the database.
It's working perfectly in FF and Chrome, but it does not work in the IE.
I have a file called comercial.php tha I include on page deficienciaIntelectual.php, where the ads appears. On that page also have a small script to change the images every 3 seconds. here are the codes.
Comercial.php:
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
include 'conexao.php';
$registros = array(0);
$qtdRegistros = 0;
function comercialRandon() {
$selectComercial = mysql_query("select nome from comercial order by rand() limit 1;");
global $registros;
$registros = mysql_fetch_array($selectComercial);
return $registros[0];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Atualiza div</title>
</head>
<body >
<?
$registros = array();
comercialRandon();
echo ' <img alt="publicidade" src="imagens/db/comercial/' . $registros[0] . '.jpg"></>';
?>
</body>
</html>
deficienciaIntelectual.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Campanha de Arrecadação de Fundos APAE</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body onLoad="modoEspera()">
<div id="painelDireita">
<p>
<img src="imagens/menininha.jpg" alt="menininha"></>
</p>
<div id="caixaTextoFlutuante">
<ul>
<li><a href="?pag=deficienciaIntelectual&contTexto=oQueE">O que é</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoPrevinir">Como Previnir</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoDiagnosticar">Como Diagnosticar</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoTratar">Como Tratar</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=direitoEBeneficios">Direitos e Benefícios</a></li>
</ul>
</div>
<div id="caixaTexto">
<? include 'paginaCaixaTexto.php'; ?>
</div>
</div>
<div id="painelEsquerda">
<div id="painelMenu">
<p id="caminhoSiteLaranja">
home > Deficiencia Intelectual
</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
</div>
<script type="text/javascript" >
function modoespera() {
setInterval("atualiza()",3000);
}
function atualiza() {
$("#comercial1").load("pages/comercial.php");
$("#comercial2").load("pages/comercial.php");
}
</script>
<div id="painelPropaganda">
<div id="comercial1" class="publicidade">
<? include 'pages/comercial.php'; ?>
</div>
<div id="comercial2" class="publicidade">
<? include 'pages/comercial.php'; ?>
</div>
</div>
</div>
</body>
</html>
I'm making a site with a div for advertising that swaps the ads (every 3 seconds) based on the name saved in the database.
It's working perfectly in FF and Chrome, but it does not work in the IE.
I have a file called comercial.php tha I include on page deficienciaIntelectual.php, where the ads appears. On that page also have a small script to change the images every 3 seconds. here are the codes.
Comercial.php:
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
include 'conexao.php';
$registros = array(0);
$qtdRegistros = 0;
function comercialRandon() {
$selectComercial = mysql_query("select nome from comercial order by rand() limit 1;");
global $registros;
$registros = mysql_fetch_array($selectComercial);
return $registros[0];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Atualiza div</title>
</head>
<body >
<?
$registros = array();
comercialRandon();
echo ' <img alt="publicidade" src="imagens/db/comercial/' . $registros[0] . '.jpg"></>';
?>
</body>
</html>
deficienciaIntelectual.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Campanha de Arrecadação de Fundos APAE</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body onLoad="modoEspera()">
<div id="painelDireita">
<p>
<img src="imagens/menininha.jpg" alt="menininha"></>
</p>
<div id="caixaTextoFlutuante">
<ul>
<li><a href="?pag=deficienciaIntelectual&contTexto=oQueE">O que é</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoPrevinir">Como Previnir</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoDiagnosticar">Como Diagnosticar</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=comoTratar">Como Tratar</a></li>
<li><a href="?pag=deficienciaIntelectual&contTexto=direitoEBeneficios">Direitos e Benefícios</a></li>
</ul>
</div>
<div id="caixaTexto">
<? include 'paginaCaixaTexto.php'; ?>
</div>
</div>
<div id="painelEsquerda">
<div id="painelMenu">
<p id="caminhoSiteLaranja">
home > Deficiencia Intelectual
</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
<p class="menuEsquerda laranja">Descrição</p>
</div>
<script type="text/javascript" >
function modoespera() {
setInterval("atualiza()",3000);
}
function atualiza() {
$("#comercial1").load("pages/comercial.php");
$("#comercial2").load("pages/comercial.php");
}
</script>
<div id="painelPropaganda">
<div id="comercial1" class="publicidade">
<? include 'pages/comercial.php'; ?>
</div>
<div id="comercial2" class="publicidade">
<? include 'pages/comercial.php'; ?>
</div>
</div>
</div>
</body>
</html>