collapse

* Posts Recentes

Cerca eléctrica por SerraCabo
[14 de Junho de 2025, 23:26]


Alguém arranja motores? por almamater
[10 de Junho de 2025, 22:34]


Condensador 4.7uF 0603 por brunus
[09 de Junho de 2025, 15:52]


+ LASERs por dropes
[30 de Maio de 2025, 23:11]


Lenovo IdeaPad 3 Não liga por jm_araujo
[07 de Maio de 2025, 19:10]


Identificar Diodo Zenner por filjoa
[01 de Maio de 2025, 23:07]


Meu novo robô por dropes
[18 de Março de 2025, 14:51]


JBL partybox On-The-Go por almamater
[21 de Fevereiro de 2025, 23:32]


Talking Reverse Engineering with an Absolute Legend! por SerraCabo
[13 de Fevereiro de 2025, 09:56]


Motoserra Stihl 120C por brunus
[11 de Fevereiro de 2025, 16:29]

Autor Tópico: Problema com ethernet shield.  (Lida 6773 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline Wolfz

  • Mini Robot
  • *
  • Mensagens: 59
Problema com ethernet shield.
« em: 30 de Julho de 2012, 00:47 »
Boas pessoal.
Alguém me consegue dizer porque que não consigo colocar mais de 2 imagens "no site"? (Eu sei que não estou a ser bem explicito, mas com o código é mais fácil de explicar).

Código: [Seleccione]
if (vars.endsWith("/?Luz")){
               client.println("");
               client.println("<img src='http://alojaimagens.com/images/onyu9cm1mkx9hnb4ccj7.jpg' style=\"position:fixed;left:3px;top:3px;width:815px;height:517px;z-index:1;padding:0;\">");
               //Luz
               client.println("<img src='http://alojaimagens.com/images/phvye4sih9ptpj21ex07.jpg' type='image' style=\"position:fixed;left:15px;top:99px;width:130px;height:40px;z-index:2;padding:0;\">");                 //
 *******//client.println("<img src='http://alojaimagens.com/images/c9660z7bfkrp40p8dby.jpg' type='image' style=\"position:fixed;left:15px;top:144px;width:130px;height:40px;z-index:2;padding:0;\">");                 //
               client.println("<a href='/?Luz' src='http://alojaimagens.com/images/phvye4sih9ptpj21ex07.jpg' type='image' style=\"position:fixed;left:15px;top:99px;width:130px;height:40px;z-index:2;padding:0;\">");  //
               client.println("<a href='/?TV' src='http://alojaimagens.com/images/c9660z7bfkrp40p8dby.jpg' type='image' style=\"position:fixed;left:15px;top:144px;width:130px;height:40px;z-index:2;padding:0;\">");  //
               delay(1);               //
               client.stop();}

Vamos ver se me consigo explicar...
Onde tem muitos asteriscos, se eu "descomentar" aquela linha ao abrir a pagina html dá erro.

Offline poliveira1978

  • Mini Robot
  • *
  • Mensagens: 335
Re: Problema com ethernet shield.
« Responder #1 em: 30 de Julho de 2012, 00:54 »
podes tentar com a macro F().

Código: [Seleccione]
client.println(F("<img src='http://alojaimagens.com/images/c9660z7bfkrp40p8dby.jpg' type='image' style=\"position:fixed;left:15px;top:144px;width:130px;height:40px;z-index:2;padding:0;\">"));não tenho a certeza se é necessário usar algum include, pode ser que mais alguém se lembre disto...

Offline Wolfz

  • Mini Robot
  • *
  • Mensagens: 59
Re: Problema com ethernet shield.
« Responder #2 em: 30 de Julho de 2012, 01:00 »
Obrigado poliveira1978, assim funciona =D

Offline Wolfz

  • Mini Robot
  • *
  • Mensagens: 59
Re: Problema com ethernet shield.
« Responder #3 em: 30 de Julho de 2012, 01:01 »
Já agora... Alguem sabe como faço para colocar as horas no centro com este código?

Código: [Seleccione]
<script type="text/javascript">
                 
//relogio


function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10)
  {i="0" + i}
  return i
}
</script>
  </head>
         
  <body onLoad="startTime()">
  <div id="txt"></div>
« Última modificação: 30 de Julho de 2012, 13:43 por Wolfz »