Ir para conteúdo
Fórum Script Brasil
  • 0

IE funciona mas no FF nops


brunocasado

Pergunta

Bom galera "terminei" um site aqui pra empresa só que fui testar no FF e deram muitos erros.... principalmente com visual(já resolvidos)

O problema mesmo é com o java e tratamento de formulários...

Estava dando uma pesquisada, e vi que realmente deve-se desenvolver sites baseando-se pelo FF, e também não usar tabelas que foi meu caso, mas agora já esta tudo pronto..

Eis o site: www.embrasol.com.br

o problema no FF é nos formularios de contato aonde tem o cep e o botao de consultar o cep. No ie funciona perfeitamente, já no FF não.

outro problema(esse aqui tá cabuloso) eu trago os produtos pelo php+mysql, e o código que eu uso está identico para ambas as paginas e no FF não aparece as imagens trazidas do banco no palco, APENAS DOS ACESSORIOS ( que coisa não?)

Ahhhh simmm, acabo de me recordar que os botões de ampliação dos acessórios não funcionam, nem no IE(porem tráz as imagens) e nem no FF (Não traz nem as fotos :( ) vou postar os códigos:

Aqui o probleminha dos acessórios lembrando que no IE as fotos aparecem porem os parametros passados no código java não funciona, e no FF as imagens não aparecem:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Detalhes - Embrasol Tec - Limpeza, Banhos por ultrasom</title>

<?php include "connection_mysql.inc" ?>

<style type="text/css">

<!--

body {

margin-left: 0px;

margin-top: 0px;

margin-right: 0px;

margin-bottom: 0px;

}

body,td,th {

font-family: Arial, Helvetica, sans-serif;

}

#embra {

position:absolute;

left:196px;

top:171px;

width:202px;

height:125px;

z-index:1;

}

a:link {

background-position: left top;

}

#embr {

position:absolute;

left:145px;

top:157px;

width:153px;

height:139px;

z-index:1;

overflow: visible;

}

-->

</style>

<link href="stilos.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style1 {

font-size: 12px;

font-weight: bold;

color:#CCCCCC;

}

.style3 {

color: #CCCCCC;

font-size: 12px;

}

-->

</style>

<!-- TemplateParam name="OptionalRegion1" type="boolean" value="false" -->

<link href="grade.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style4 {font-size: 12px}

.style5 {color: #666666;font-family:Arial, Helvetica, sans-serif;font-size:12px;}

.style6 {color: #FF0000}

.style7 {

font-size: 9px;

color: #FF0000;

}

-->

</style>

</head>

<body oncontextmenu="return false";>

<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="22" align="center" background="images/lateral_esquerdo.png">&nbsp;</td>

<td width="736" align="center"><img src="images/toppo.jpg" width="736" height="89" /></td>

<td width="22" align="center" background="images/lateral_direito.png">&nbsp;</td>

</tr>

</table>

<table width="780" height="316%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="22" height="522" background="images/embra_04.png">&nbsp;</td>

<td width="735" valign="top"><table width="735" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="735"><img src="images/tarja_topo.jpg" width="736" height="55" /></td>

</tr>

</table>

<table width="736" height="150" border="0" cellpadding="0" cellspacing="0">

<tr>

<td width="209" height="50" valign="top"><p class="style1"> </p>

<table width='100%' align="left" cellpadding="0" cellspacing="0">

<tr>

<?php

$id = $_GET['id'];

$query_img = mysql_query("SELECT * from categ where id_categ=$id");

$query_result = mysql_fetch_row($query_img);

$image[0] = getimagesize("$query_result[5]");

$image[1] = getimagesize("$query_result[6]");

$x[0] = $image[0][0];

$y[0] = $image[0][1];

$x[1] = $image[1][0];

$y[1] = $image[1][1];

?>

<script language=JavaScript" type="text/javascript">

function Detalhes1(url)

{

window.open(url, '_blank', "width=<?php echo $x[0] ?>,height=<?php echo $y[0];?>,toolbar=no,location=no,directories=no,status=no");

}

function Detalhes2(url)

{

window.open(url, '_blank', "width=<?php echo $x[1] ?>,height=<?php echo $y[1];?>,toolbar=no,location=no,directories=no,status=no");

}

</script>

<?php

if ($query_result[2] == ""){}else{echo "<td valign='top' align='center' width='auto'><img src=".$query_result[2]."></td>";}

if ($query_result[3] == ""){}else{echo "<td valign='top' align='center width='auto'><img src=".$query_result[3]."></td>";}

?>

</tr>

<tr valign="top">

<td height="17" align="center" valign="top"><?php if ($query_result[2] == ""){}else{echo "<a href=java script:Detalhes1('ampliar.php?id=$query_result[0]&opcao=1')><img src='imagens/Layout/ampliar.png' alt='Ampliar' width='100' height='20' id='detalhes'/></a>";}?></td>

<td valign="top" align="center"><?php if ($query_result[3] == ""){}else{echo "<a href=java script:Detalhes2('ampliar.php?id=$query_result[0]&opcao=2')><img src='imagens/Layout/ampliar.png' alt='Ampliar' width='100' height='20' id='detalhes'/></a>";}

?>

</td>

</tr>

</table></td>

<td width="370" valign='top'><p class='style5'> <?php echo str_replace('• ','<br>• ',$query_result[4]);?><br />

</p></td>

<td width="157" valign="top"><?php include "menu.inc" ?></td>

</tr>

</table>

<table width="100%" height="107" border="0" cellpadding="0" cellspacing="0">

<tr>

<td height="22" valign="top"><div id="barraprodutos"></div></td>

</tr>

<tr>

<td height="85" valign="top"><div id="divdetail" >

<div class="style4">Características técnicas</div>

<table width="100%">

<tr>

<td height="60" align="left"><table width="728" border="0" class="gradedetail" id="gradedetail">

<tr>

<td width="86" align="center"><strong>Modelo</strong></td>

<td width="89" align="center"><strong>Capacidade(LT)</strong></td>

<td width="108" align="center"><strong>Dimens&otilde;es(mm)<br/>

Tanque(CXLXP)</strong></td>

<td width="100" align="center"><strong>Dimens&otilde;es(mm)<br/>

Gabinete(LXPXA)</strong></td>

<td width="99" align="center"><strong>Potencia(Watts)</strong></td>

<td width="88" align="center"><strong>Voltagem</strong></td>

<td width="126" align="center"><strong>Aquecimento</strong></td>

<td width="126" align="center"><strong>Acabamento Externo</strong></td>

</tr>

<?php

$resultado = mysql_query("SELECT * FROM products inner join categ on products.id_categ=categ.id_categ where products.id_categ=$id order by products.capacidade, products.model asc");

$linhas = mysql_num_rows($resultado);

if($linhas == 0){

echo "<hl>Produtos não Encontrados!</h1>";}

else{

for($i=0;$i<$linhas;$i++){

$registro = mysql_fetch_row($resultado);

?>

<tr>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo str_replace("aco","aço",$registro[1]); ?> </td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[2]; ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[3]; ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[4]; ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[5]; ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[7]; ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo str_replace("não","não",$registro[9]); ?></td>

<td nowrap="nowrap" align="center" onmouseover="this.style.backgroundColor='#CCCCCC';" onmouseout="this.style.backgroundColor='#E0E0E0';"><?php echo $registro[8]; ?></td>

</tr>

<?php

}

}

?>

</table></td>

</tr>

</table>

</div></td>

</tr>

</table>

<table width="100%" cellpadding="no" cellspacing="no">

<tr>

<td height="148" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="60"><div align="right"><a href="<?php echo $query_result[7];?>" target="_blank"><img src="imagens/Layout/pdf.jpg" name="pdf" width="192" height="56" border="0" id='pdf'/><br />

</a></div></td>

</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><br/>

<div id='tarjaacess'>Acess&oacute;rios Opcionais</div></td>

</tr>

</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#0000FF">

<tr>

<td><table width="100%" border='0' bgcolor="#FFFFFF" id='gradeacess'><?php

$acess_query = mysql_query("SELECT * FROM acessorios");

$acess_lines = mysql_num_rows($acess_query);

?>

<script language="JavaScript" type="text/javascript">

function pop_acess(url,XX,YY)

{

window.open(url, '_blank', "width="+XX+",height="+YY+",toolbar=no,location=no,directories=no,status=no");

}

</script>

<?php

if ($acess_lines == 0){

echo "Acessórios não Encontrados!";

}

for($t=0;$t<$acess_lines;$t++){

$acess_result = mysql_fetch_row($acess_query);

$size[$t] = getimagesize("$acess_result[3]");

$w[$t] = $size[$t][0];

$h[$t] = $size[$t][1];

?>

<tr>

<td width="13%" height="54" align="center"><?php echo "<a href=java script:pop_acess('acess_amplia.php?id=$acess_result[0]'," . $w[$t] . "," . $h[$t] . ")><img border=0 src=" . $acess_result[2] ."></a>";?></td>

<td width="87%"><?php echo $acess_result[1]; ?><span class="style6">*</span></td>

</tr>

<?php }

?>

<tr>

<td></td>

<td><span class="style7">*Imagens meramente ilustrativas, podendo variar de acordo com o modelo da lavadora. Clique na foto para ampliar.</span></td>

</tr>

</table>

</td>

</tr>

</table></td>

</tr>

</table>

<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">

<tr>

<td height="20" valign="top"><div id="tarjarodape"></div>

<div align="center" class="style3">www.embrasol.com.br - Embrasol Tec - Todos os Direitos Reservados - 2008<br />

Site melhor visualizado em 1024x768 - Internet Explorer 7.0</div></td>

</tr>

</table></td>

<td width="22" background="images/embra_06.png">&nbsp;</td>

</tr>

</table>

</body>

</html>

Logo abaixo vocês perceberão o código do formulário com o problema do CEP em vermelho, a sim, tambem o código de verificação de campos null, no FF não funciona:

<div id='formdiv'><table width="492" border="0" align="center">

<tr>

<td width="387" valign="top"> <form name="formmail" form action="http://hospedagem.terraempresas.com.br/cgi-bin/FormMail.pl" method="post" onSubmit="return valida_orc()">

<p>

<input type="hidden" name="destination" value="vendas@embrasol.com.br">

<input type="hidden" name="feedback" value="http://www.embrasol.com.br" />

<input type="hidden" name="subject" value="Consulta Web Site ref. Banhos e Lavadoras por ultra-som">

<script> function valida_orc() {

if (formmail.Nome.value=="") {

alert("* Favor preencher o campo razao social!");

formmail.Nome.focus();

return false;

}

if (formmail.CEP.value=="") {

alert("* Favor preencher o campo CEP!");

formmail.CEP.focus();

return false;

if (formmail.end.value=="") {

alert("* Favor Preencher o campo Endereço!");

formmail.end.focus();

return false;

}

}

if (formmail.Cidade.value=="") {

alert("* Favor preencher o campo Cidade!");

formmail.Cidade.focus();

return false;

}

if (formmail.estado.value=="") {

alert("* Favor preencher o campo Estado!");

formmail.estado.focus();

return false;

}

if (formmail.ramo.value=="") {

alert("* Favor Preencher o campo Ramo De atividade!");

formmail.ramo.focus();

return false

}

if (formmail.contato.value=="") {

alert("* Favor preencher o campo Contato!");

formmail.contato.focus();

return false;

}

if (formmail.email.value=="") {

alert("* Favor preencher o campo E-mail!");

formmail.email.focus();

return false;

}

if (formmail.depto.value=="") {

alert("* Favor Preencher o campo Departamento!");

formmail.depto.focus();

return false

}

if (formmail.DDD.value=="") {

alert("* Favor preencher o campo DDD!");

formmail.DDD.focus();

return false;

}

if (formmail.Telefone.value=="") {

alert("* Favor preencher o campo Telefone!");

formmail.Telefone.focus();

return false;

}

if (formmail.interesse.value=="") {

alert("* Favor preencher o campo Produto(s) de Interesse!");

formmail.interesse.focus();

return false;

}

if (formmail.aplicacao.value=="") {

alert("* Favor Preenche o campo Aplicaçao");

formmail.aplicacao.focus();

return false;

}

if (formmail.Residuos.value=="") {

alert("* Favor Preencher o campo Tipos de Resíduos a serem removidos!");

formmail.Residuos.focus();

return false;

}

}

</script> <?php

$cepp = $_POST['CEPp];

$nome = $_POST['Nomee'];

function busca_cep($cep){

$resultadocep = @file_get_contents('http://republicavirtual.com.br/web_cep.php?cep=.urlencode($cep).'&formato=query_string');

if(!$resultado){

$resultado = "&resultado=0&resultado_txt=erro+ao+buscar+cep";

}

parse_str($resultadocep, $retorno);

return $retorno;

}

if($cepp == ""){}else{

$resultado_busca = busca_cep($cepp);

}

?>

<table width="387" height="500" border="0" cellpadding="1" cellspacing="1" bordercolor="#000000" class="style5" id="contatotable">

<tr>

<td width="152" height="22" class="style4">Raz&atilde;o Social:</td>

<td width="7" class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td width="244" class="style4">

<div align="left" class="style5">

<input name="Nome" type=text class="texto" id="Nome2" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';" value="<?php echo $nome ?>" size="40">

</div></td>

</tr>

<tr>

<td class="style4">CEP:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="CEP" type=text class="texto" id="CEP3" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';" value="<?php echo $cepp; ?>" size="8" maxlength="8" response.write() />

</div></td>

</tr>

<tr>

<td height="22" class="style4">Endere&ccedil;o:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="end" class="texto" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';" value="<?php echo $resultado_busca['tipo_logradouro] . " " . $resultado_busca['logradouro'] ?>" size=40">

</div></td>

</tr>

<tr>

<td class="style4">Cidade:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="Cidade" type=text class="texto" id="Cidade" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';" value="<?php echo $resultado_busca['cidade] ?>" size="0">

</div></td>

</tr>

<tr>

<td class="style4">Estado:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="estado" type=text class="texto" id="estado2" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';" value="<?php echo $resultado_busca['uf'] ?>" size=2" maxlength="2">

</div></td>

</tr>

<tr >

<td class="style4">Ramo de Atividade</td>

<td class="style4">

<div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="ramo" class="texto" id="ramo" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Contato:</td>

<td class="style4"><div align="center"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="contato" class="texto" id="contato" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Email:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="email" type=text class="texto" size="30" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Departamento</td>

<td class="style4"><font color="#FF0000">*</font></td>

<td class="style4">

<div align="left" class="style5">

<input name="depto" class="texto" id="depto" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">DDD:</td>

<td class="style4"> <div align="center" class="style5"><font color="#FF0000">*</font></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="DDD" type=text class="texto" id="DDD" onblur="this.style.borderColor='#99CCFF';" onfocus="this.style.borderColor='red';" size="1" maxlength="3">

</div></td>

</tr>

<tr>

<td class="style4">Telefone:</td>

<td class="style4"><font color="#FF0000">*</font></td>

<td class="style4">

<div align="left" class="style5">

<input name="Telefone" type=text class="texto" id="Telefone3" size="20" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Ramal:</td>

<td class="style4"> <div align="center"></div></td>

<td class="style4">

<div align="left" class="style5">

<input name="Ramal" type=text class="texto" id="Ramal3" size="5" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Celular:</td>

<td class="style5">&nbsp;</td>

<td valign="top" class="style4">

<div align="left" class="style5">

<input name="cel" class="texto" id="cel" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';">

</div></td>

</tr>

<tr>

<td class="style4">Produto(s) de Interesse:</td>

<td class="style4"><font color="#FF0000">*</font></td>

<td valign="top" class="style4">

<div align="left" class="style5">

<textarea name="interesse" cols="30" rows="3" id="interesse" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';"></textarea>

</div></td>

</tr>

<tr>

<td class="style4">Aplicaç&atilde;o:</td>

<td class="style4"><font color="#FF0000">*</font></td>

<td class="style4">

<div align="left" class="style5">

<textarea name="aplicacao" cols="30" rows="3" id="aplica&ccedil;&atilde;o" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';"></textarea>

</div></td>

</tr>

<tr>

<td class="style4">Tipo de resíduos a

serem removidos:</td>

<td class="style4"><font color="#FF0000">*</font></td>

<td class="style4">

<div align="left" class="style5">

<textarea name="Residuos" cols="30" rows="3" id="Residuos" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';"></textarea>

</div></td>

</tr>

<tr>

<td class="style4">Solicita&ccedil;&otilde;es:</td>

<td height="10" class="style5"></td>

<td valign="top" class="style4">

<div align="left" class="style5">

<textarea name="solicitaçoes" cols="30" rows="4" wrap="virtual" id="textarea" onfocus="this.style.borderColor='red';" onblur="this.style.borderColor='#99CCFF';"></textarea>

</div></td>

</tr>

<tr class="font">

<td height="21" align="center" class="style4">Entrar

em contato via:</td>

<td class="style5"></td>

<td class="style4">

<p align="center" class="style5">

<input name="Resposta" type="radio" value="E-mail" checked>E-mail

<input name="Resposta" type="radio" value="Telefone">

Telefone </td>

</tr>

<tr bgcolor="#FFFFFF">

<td height="24" colspan="3" class="style5">

<div align="center">

<input name="submit" type="submit" class="Enviar" value="Enviar Email" return valida_orc() >

<input name="reset" type="reset" value="Limpar">

</div></td>

</tr>

</table>

</form> </td>

<td width="95" valign="top"><form id="form1" name="form1" method="post" action="">

<div id='cep'><span class="style4">

<input type="submit" name="botao" id="botao" value="Consultar Cep" onclick="transfere();" />

</span>

<script>function transfere() {

document.getElementById('CEPp').value=document.getElementById('CEP').value;

document.getElementById('Nomee').value=document.getElementById('Nome').value;

}

</script>

<label>

<input type="hidden" name="CEPp" id="CEPp" />

<input type="hidden" name="Nomee" id="Nomee" />

</label><?php if($cepp == ""){}else{

$resultado_busca = busca_cep($cepp);

if($resultado_busca['resultado]==0){echo "<strong><font color='red'>Cep N&atilde;o Encontrado!</font></strong>";}

}?></div>

</form>

</table>

aqui no document.getElementById('CEPp').value=document.getElementById('CEP').value; diz que o valor do CEP está null. porem ao ativar o formulario do CEP ele passa o valor para string e joga no campo CEP do outro formulario(de envio). No ie passa normalmente, já no FF ele não passa o valor para o campo.

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Resolvido 1 problema...... das imagens, ao cadastrar no banco os acessorios sem querer coloquei as barras \ e o FF é muito rigoroso requer a barra /

tanto que está pegando as dimensões das foto no IE e no FF colocando as imagens está certinho...

POREM, continua o problema do formulario..... o botao do cep não está recebendo os valores das variaveis, e a verificaçao dos campos não está ocorrendo

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...