Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Tato..

[Resolvido] Problema com IE

Recommended Posts

Gente to com um problema com um site no IE.

Ele fica como se não houvessem os recursos do jQuery. o IE me reporta o seguinte:

 

Detalhes dos erros da página da Web

 

Agente de Usuário: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.3; msn OptimizedIE8;PTBR)

Carimbo de data/hora: Wed, 18 Apr 2012 20:00:35 UTC

 

 

Mensagem: Erro de sintaxe

Linha: 4

Caractere: 1

Código: 0

URI: http://192.168.254.198/anderson/

 

 

Mensagem: Identificador, seqüência ou número esperado

Linha: 81

Caractere: 9

Código: 0

URI: http://192.168.254.198/anderson/

 

 

Mensagem: O objeto não dá suporte para a propriedade ou método

Linha: 46

Caractere: 2

Código: 0

URI: http://192.168.254.198/anderson/js/app.js

 

 

 

e o site:

INDEX.PHP

<?php
include("connect.php");
$resolucao = $_GET['w'];
if ($resolucao==''){
?>

<script type="text/javascript">
<!--
const reso = screen.height;
var res = reso
location.href = '?w='+reso;
//-->
</script>
<?php
   }
   $useragent = $_SERVER['HTTP_USER_AGENT'];
   $css = 'css/css.css'; 
 if (preg_match('|MSIE ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
   $browser_version=$matched[1];
   $browser = 'IE';
 } elseif (preg_match( '|Opera/([0-9].[0-9]{1,2})|',$useragent,$matched)) {
   $browser_version=$matched[1];
   $browser = 'Opera';
 } elseif(preg_match('|Firefox/([0-9\.]+)|',$useragent,$matched)) {
   $browser_version=$matched[1];
   $browser = 'Firefox';
 } elseif(preg_match('|Chrome/([0-9\.]+)|',$useragent,$matched)) {
   $browser_version=$matched[1];
   $browser = 'Chrome';
 } elseif(preg_match('|Safari/([0-9\.]+)|',$useragent,$matched)) {
   $browser_version=$matched[1];
   $browser = 'Safari';
 } else {
   // browser not recognized!
   $browser_version = 0;
   $browser= 'other';
 }

   if($browser=='IE'){
   header("Location: navegadores.htm");
   }
   if($browser=='Opera'){
       $css = 'css/css1.css';
   };
?>
<?php

//FIM DE CHECAGEM DA RESOLUÇÃO DA TELA
////////////////////////////////////////////////////////////////////////////////


?>


<!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" xml:lang="en" lang="en">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="altair" />
   <link rel="stylesheet" href="<?php echo $css ?>" type="text/css" />
   <link rel="stylesheet" href="css/jquery.lightbox-0.5.css" type="text/css" />
   <link rel="stylesheet" href="css/jquery-ui.css" type="text/css" />

   <script type="text/javascript" src="js/jquery-1.7.1.min.js" ></script>
   <script type="text/javascript" src="js/app.js" ></script>
   <script type="text/javascript" src="js/jquery.min.js" ></script>
   <script type="text/javascript" src="js/ajax.js" ></script>
   <script type="text/javascript" src="js/cufon-yui.js"></script>
   <script type="text/javascript" src="js/jquery.bxSlider.min.js"></script>
   <script type="text/javascript" src="js/jquery.lightbox-0.5.min.js"></script>
   <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
   <script type="text/javascript" src="js/jquery.lightbox-0.5.pack.js"></script>
   <script type="text/javascript" src="jquery.js"></script>

<title>Untitled 2</title>
</head>

<body onload="hidden()" >
   <script type="text/javascript">
       <!--
       function hidden(){overflow='hidden';}
       //-->
   </script>

<table width="<?php echo $resolucao,'px' ?>" border="0" cellpadding="0" cellspacing="0" class="table">
   <tr>
       <td colspan="2" class="fundologo">
           <div class="nav">
               <ul id="menu">        
                   <li>
                       <a href="home.php">
                       <img width="270px" height="160px" src="images/Estudo_03_link.png" alt="link" />
                       </a>
                   </li>                    
               </ul>            
           </div>
       </td>
       <td rowspan="3">
           <div id="conteudo">
               <?php
                   include("arquivos/home.php");
               ?>
           </div>
       </td>
   </tr>




   <tr align="right">
       <td class="outro"colspan="1" >
                       <img src="images/ajax-loader.gif" alt="load" id="carregando"/>
       </td>

       <td class="borda" align="left" valign="top">
           <div id="nav">
               <ul id="menu">
                   <li><a class="link" href="redir.php">Blog</a></li>
                   <li><a class="link" href="port.php">Portfolio</a></li>
                   <li><a class="link" href="serv.php">Serviços</a></li>
                   <li><a class="link" href="contato.php">Contato</a></li>
               </ul>
           </div>
       </td>
   </tr>

   <tr>
       <td class="fim">

       </td> 

       </tr>

</table>

</body>
</html>

 

 

HOME.PHP

<!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" xml:lang="en" lang="en">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="altair" />

<title>Untitled 7</title>
</head>

<body>
   <script type="text/javascript">
   $(document).ready(function(){
       $('#div').bxSlider({
           displaySlideQty: 4,
           moveSlideQty: 1,
           infiniteLoop: true,
           pager: false,
           pagerType: 'short',
           speed: 2000,
           prevImage: 'images/Estudo_09.png',
           nextImage: 'images/Estudo_11.png',           
           prevSelector: '#prev',
           nextSelector: '#next',
       });
   });

   $(document).ready(function(){
       $('.cthumbs a').lightBox();
   });
   </script>
<?php
$idpag = index_pag;
if(!isset($sql)){
   include("../connect.php");  
   };
?>
               <div class="botoes">
                   <div align="left" class="movprev"><a id="prev" onclick="goToNextSlide()"><img alt="" src="" /></a></div>
                   <div align="right" class="movnext"><a id="next" onclick="goToPreviousSlide()"><img alt="" src="" /></a></div>
               </div>    
  <table class="conteudo" border="0" cellpadding="0" cellspacing="0">
       <tr>
           <td class="home">
               <img src="images/Estudo_04.png" alt="Home"/>
           </td>
       </tr>

       <tr>
           <td class="banhome" colspan="1" id="demo">
               <div id="div" class="demo">
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>
                   <div class="content cthumbs">
                       <div class="cima">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1.jpg" href="aaaaaaaa"><img class="imgthunb" src="images/thumbs/WEB/1.jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(1).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(1).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(2).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(2).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(3).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(3).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                       <div class="baixo">
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(4).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(4).jpg" alt="1" width="123" height="132"/></a>   
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(5).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(5).jpg" alt="2" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(6).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(6).jpg" alt="1" width="123" height="132"/></a>
                           <a class="slidelink" rel="lightbox" href="images/WEB/1(7).jpg"><img class="imgthunb" src="images/thumbs/WEB/1(7).jpg" alt="2" width="123" height="132"/></a>
                       </div>
                   </div>




               </div>
           </td>
       </tr>

           <tr>
           <td class="texto">
               <div class="texto" id="jsp">
                   <?php
                       $cont = mysql_query("SELECT * FROM $idpag ORDER BY id ASC LIMIT 0, 3")
                           or die(mysql_error());

                       while($post=mysql_fetch_array($cont)){
                           $id=$post['id'];
                           $titulo=$post['titulo'];
                           $texto=$post['texto'];
                           $id_autor=$post['id_autor'];
                       };

                       $titulo = nl2br($titulo);


                       $texto = nl2br($texto);

                   ?>
                       <h1><?php echo("$titulo</br></br>");?></h1>
                       <h3><?php echo("$texto");?></h3>

               </div>
           </td>
           </tr>
   </table>
</body>
</html>

 

 

Desde já Agradeço..

Compartilhar este post


Link para o post
Compartilhar em outros sites

remova essa virgula:

 

            nextSelector: '#next'
       });

Compartilhar este post


Link para o post
Compartilhar em outros sites

cara você está imprimindo um script antes da definição do doctype, no IE se tiver qualquer coisa antes do doctype sua página não funciona direito.

ou seja, jogue o script para dentro de head e remova todo e qualquer espaço antes do doctype do html.

 

o ; citado não interfere, ao contrário é o mais correto, pois todo comando javascript finaliza com um ;

Compartilhar este post


Link para o post
Compartilhar em outros sites

o ; citado não interfere, ao contrário é o mais correto, pois todo comando javascript finaliza com um ;

Oi @Denilson,

 

Eu me referi a esta vírgula:

            nextSelector: '#next',
});

e não ao ponto e virgula. Realmente o ponto e virgula é correto.

Porém aquela virgula, depois da string next não.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pocha galera, muito obrigado mesmo, acho que o que eu precisava, era das duas respostas. Pois os scripts do jQuery não estavam pegando e nem o que era PHP, valeu mesmo, me quebraram uma.

 

Problema Resolvido!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.