Jump to content


Dark Panda

Member Since 25/11/2009
Offline Last Active 18/03/2010, 17:34
-----

Topics I've Started

Função "Swapimage"

11/03/2010, 17:37

Saudações a todos,

Encontrei uma função que gostaria de aplicar na minha página. Ela faz com que um ícone e uma imagem sejam simultaneamente trocadas por outras quando o mouse passa por cima do ícone e restaura o estdo original de ambas quando se tira o cursor do mesmo, como pode ser conferido no exemplo:

http://www.darkpandabr.com/teste2/

(passem o mouse nos ícones; eles trocam de cor e uma opção aparece na parte superior da tela).

Analisei o código, vi como funciona e apliquei na minha página:

http://www.darkpanda...te/port-00.html

(só no primeiro quadrado)

O problema é que só ocorre o swap da primeira (ícone) e o da segunda não (que é o fundo onde tem a pata).

O código original é esse:

<script language="JavaScript">
var TabImg = new Array();
function preloadImg()
{var pic=preloadImg.arguments;for (var i=0;i<pic.length;i++){TabImg[i]=new Image;TabImg[i].src="images/"+pic[i]+".jpg";}}
preloadImg("te2","te3","tg2","ti2","tk2","tm2");
function On(img)
{document.images[img].src="images/"+img+"a.jpg";document.images["titre"].src="images/t"+img+".jpg";}
function Off(img)
{document.images[img].src="images/"+img+".jpg";document.images["titre"].src="images/vide.bmp";}
</script>


No HTML original esta assim:

<td colspan=2><a href=# onMouseOver="On('e2')" onMouseOut="Off('e2')"><img name=e2 src=images/e2.jpg width=28 height=45></a></td>


Minha adaptação ficou assim:

var TabImg = new Array();
function preloadImg()
{var pic=preloadImg.arguments;for (var i=0;i<pic.length;i++){TabImg[i]=new Image;TabImg[i].src="images/"+pic[i]+".jpg";}}
preloadImg("port-00_08t");
function On(img)
{document.images[img].src="images/"+img+"s.jpg";document.images["titre"].src="images/"+img+"t.jpg";}
function Off(img)
{document.images[img].src="images/"+img+".jpg";document.images["titre"].src="images/port-00_03.jpg";}

Onde, pelo que entendi; port-00_03.jpg = fundo / images/"+img+"s.jpg" são as imagens que farão o swap (nome da img +s .jpg ) / images/"+img+"t.jpg são as imagens - fundo - que farão o swap (nome da img +t .jpg )

No meu HTML deixei assim:

<div class="ts-3-8"><a href=# onMouseOver="On('port-00_08')" onMouseOut="Off('port-00_08')"><img src=images/port-00_08.jpg name=port-00_08 width=87 height=85 border="0"></a></div>

Será que alguém consegue dar uma força para encontrar o erro?

Desde já, grato pela atenção dispensada.

Fuçando um pouco, vi que o Dreamwever "estranhou" o fato das imagens terem hífen e, por este motivo, não queria nomeá-las; troquei todos os hífens por underline, mas parece que essa não é a causa da falta de funcionalidade de parte do código...

Site Com Visualização Incorreta No Ie / Ff

03/12/2009, 13:36

Saudações a todos,

Estou fazendo meu portifólio, quando finalizava os testes da página, ela abria corretamente no IE e aparecia com defeito no FF. Como estava inicialmente preocupado com o funcionamento dos .JS, não dei muita relevância ao caso. Hoje, a mesma página não aparece da forma correta em nenhum browser.

O link esta aqui:
http://www.darkpanda...-01_logo_0.html

O HTML esta assim:

HTML
<html>
<head>
<title>Logotipo</title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5764" name=GENERATOR>
<link href="estrutura/estrutura.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="estrutura/box.js"></script>
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="InitialiseScrollableArea()">
<div id="centralizar">
<div id="Table_01" class="ts01-1">
<div class="ts01-1-1"><img height="3" alt="" src="images/strut_01.gif" width="807"></div>
<div class="ts01-1-2"><img height="457" alt="" src="images/strut_02.gif" width="3"></div>
<div class="ts01-1-3">
<iframe id=fundo_logo name="fundo_logo" src="port-01_logo_0_bg.html" width="625" height="454" scrolling="no" border="0" frameborder="0"></iframe>
</div>
<div class="ts01-1-4"><img height="457" alt="" src="images/strut_13.gif" width="3"></div>
<div class="ts01-1-5"><img height="31" alt="" src="images/port-01_05.gif" width="173"></div>
<div class="ts01-1-6"><img height="457" alt="" src="images/strut_14.gif" width="3"></div>
<div class="ts01-1-7"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
<div class="ts01-1-8">
<div id="divUpControl" style="left: 0px; width: 173; height: 4; top: -6px">
<div align="center"><a href="java script:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</div>
</div>
<div id="divDownControl" style="left: 0px; width: 173; height: 4; top: 227px">
<center>
<a href="java script:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</center>
</div>
<div id="divContainer"; top:2; width: 173px; height: 235px; visibility: visible">
<div id="divContent"; top:0; height:144; width: 173px>
<div id="table_01" class="tsi01-1">
<div class="tsi01-1-1">
<a href="port-01_logo_dna.html" target="fundo_logo" onClick="changeLink('port-01_logo_dna_t.html')"><img height="85" alt="" src="images/box_i01.gif" width="87" border="0" frameborder="0"></a>
</div>
<div class="tsi01-1-2"><img height="85" alt="" src="images/box_i02.gif" width="86"></div>
<div class="tsi01-1-3"><img height="75" alt="" src="images/box_i03.gif" width="87"></div>
<div class="tsi01-1-4"><img height="75" alt="" src="images/box_i04.gif" width="86"></div>
<div class="tsi01-1-5"><img height="75" alt="" src="images/box_i05.gif" width="87"></div>
<div class="tsi01-1-6"><img height="75" alt="" src="images/box_i06.gif" width="86"></div>
<div class="tsi01-1-7"><img height="75" alt="" src="images/box_i07.gif" width="87"></div>
<div class="tsi01-1-8"><img height="75" alt="" src="images/box_i08.gif" width="86"></div>
<div class="tsi01-1-9"><img height="75" alt="" src="images/box_i09.gif" width="87"></div>
<div class="tsi01-1-10"><img height="75" alt="" src="images/box_i10.gif" width="86"></div>
<div class="tsi01-1-11"><img height="75" alt="" src="images/box_i11.gif" width="87"></div>
<div class="tsi01-1-12"><img height="75" alt="" src="images/box_i12.gif" width="86"></div>
</div>
</div>
</div>
</div>
<div class="ts01-1-9"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
<div class="ts01-1-10"><iframe id=texto_f name="texto_f" src="port-01_logo_0_t.html" width="173" height="152" scrolling="No" border="0" frameborder="0"></iframe></div>
<div class="ts01-1-11"><img height="3" alt="" src="images/strut_16.gif" width="173"></div>
<div class="ts01-1-12"><img height="24" alt="" src="images/strutc_06.gif" width="42"></div>
<div class="ts01-1-13"><img height="27" alt="" src="images/strut_17.gif" width="3"></div>
<div class="ts01-1-14"><img height="24" alt="" src="images/strutc_07.gif" width="43"></div>
<div class="ts01-1-15"><img height="27" alt="" src="images/strut_18.gif" width="3"></div>
<div class="ts01-1-16"><img height="24" alt="" src="images/strutc_08.gif" width="54"></div>
<div class="ts01-1-17"><img height="27" alt="" src="images/strut_19.gif" width="3"></div>
<div class="ts01-1-18"><img height="24" alt="" src="images/strutc_09.gif" width="25"></div>
<div class="ts01-1-19"><img height="3" alt="" src="images/strut_20.gif" width="625"></div>
<div class="ts01-1-20"><img height="3" alt="" src="images/strut_21.gif" width="42"></div>
<div class="ts01-1-21"><img height="3" alt="" src="images/strut_22.gif" width="43"></div>
<div class="ts01-1-22"><img height="3" alt="" src="images/strut_23.gif" width="54"></div>
<div class="ts01-1-23"><img height="3" alt="" src="images/strut_24.gif" width="25"></div>
<div class="ts01-1-24"><img height="15" alt="" src="images/strutc_01.gif" width="269"></div>
<div class="ts01-1-25"><img height="15" alt="" src="images/strutc_02.gif" width="269"></div>
<div class="ts01-1-26"><img height="15" alt="" src="images/strutc_03.gif" width="269"></div>
<div class="ts01-1-27"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts01-1-28"><img height="1" alt="" src="images/strut_00.gif" width="266"></div>
<div class="ts01-1-29"><img height="1" alt="" src="images/strut_00.gif" width="269"></div>
<div class="ts01-1-30"><img height="1" alt="" src="images/strut_00.gif" width="90"></div>
<div class="ts01-1-31"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts01-1-32"><img height="1" alt="" src="images/strut_00.gif" width="42"></div>
<div class="ts01-1-33"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts01-1-34"><img height="1" alt="" src="images/strut_00.gif" width="43"></div>
<div class="ts01-1-35"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts01-1-36"><img height="1" alt="" src="images/strut_00.gif" width="54"></div>
<div class="ts01-1-37"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts01-1-38"><img height="1" alt="" src="images/strut_00.gif" width="25"></div>
<div class="ts01-1-39"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
</div>
</div>
</body>
</html>


Desde já, grato pela atenção dispensada.

2 Frames Com 1 Clique + Compatibilidade De Browsers

29/11/2009, 20:48

Saudações a todos,

Fiz um certo progresso nas pesquisas e consegui o efeito que queria (as rolagens automáticas via javascript):

http://www.darkpanda...-01_logo_0.html

Agora estou tentando fazer com que 1 clique troque dois iframes, mas não esta funcionando.

O código que utilizei foi esse:

function changedna(purgatorio/port-01_logo_dna.html, purgatorio/port-01_logo_dna_t.html){
parent.document.getElementById("fundo_logo").src=purgatorio/port-01_logo_dna.html
parent.document.getElementById("texto_f").src=purgatorio/port-01_logo_dna_t.html
}

A chamada no html foi essa:

<div class="tsi01-1-1">
       	     <a href="javascript:changedna()">
        	<img height="85" alt="" src="images/box_i01.gif" width="87">        	
             </a>
        </div>

mas o treco não funcionou.

Além disso, a página só aparece corretamente no IE, no FF aparece totalmente desconfigurada; será que alguém teria alguma idéia de como resolver os casos?

Ah! O código html inteiro é esse:

<html>
	<head>
		<title>Logotipo</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<link href="estrutura/estrutura.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="estrutura/box.js"></script>
		<script type="text/javascript" src="estrutura/iframes_c.js"></script>
	</head>
	<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="InitialiseScrollableArea()">
		<div id="centralizar">
		<div id="Table_01" class="ts01-1">
			<div class="ts01-1-1"><img height="3" alt="" src="images/strut_01.gif" width="807"></div>
			<div class="ts01-1-2"><img height="457" alt="" src="images/strut_02.gif" width="3"></div>
			<div class="ts01-1-3">
			  <iframe id=fundo_logo name="fundo_logo" src="port-01_logo_0_bg.html" width="625" height="454" scrolling="no" frameborder="0" ></iframe>
			</div>
		  <div class="ts01-1-4"><img height="457" alt="" src="images/strut_13.gif" width="3"></div>
			<div class="ts01-1-5"><img height="31" alt="" src="images/port-01_05.gif" width="173"></div>
			<div class="ts01-1-6"><img height="457" alt="" src="images/strut_14.gif" width="3"></div>
			<div class="ts01-1-7"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
			<div class="ts01-1-8">
<div id="divUpControl" style="left: 0px; width: 173; height: 4; top: -6px"> 
  <div align="center"><a href="javascript:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
	</div>
</div>
		<div id="divDownControl" style="left: 0px; width: 173; height: 4; top: 227px"> 
		<center>
<a href="javascript:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a> 
		</center>
		</div>
<div id="divContainer"; top:2; width: 173px; height: 235px; visibility: visible"> 
<div id="divContent"; top:0; height:144; width: 173px>
		<div id="table_01" class="tsi01-1">
		<div class="tsi01-1-1">
        	<a href="javascript:changedna()">
        		<img height="85" alt="" src="images/box_i01.gif" width="87">        	
             </a>
        </div>
		<div class="tsi01-1-2"><img height="85" alt="" src="images/box_i02.gif" width="86"></div>
		<div class="tsi01-1-3"><img height="75" alt="" src="images/box_i03.gif" width="87"></div>
		<div class="tsi01-1-4"><img height="75" alt="" src="images/box_i04.gif" width="86"></div>
		<div class="tsi01-1-5"><img height="75" alt="" src="images/box_i05.gif" width="87"></div>
		<div class="tsi01-1-6"><img height="75" alt="" src="images/box_i06.gif" width="86"></div>
		<div class="tsi01-1-7"><img height="75" alt="" src="images/box_i07.gif" width="87"></div>
		<div class="tsi01-1-8"><img height="75" alt="" src="images/box_i08.gif" width="86"></div>
		<div class="tsi01-1-9"><img height="75" alt="" src="images/box_i09.gif" width="87"></div>
		<div class="tsi01-1-10"><img height="75" alt="" src="images/box_i10.gif" width="86"></div>
		<div class="tsi01-1-11"><img height="75" alt="" src="images/box_i11.gif" width="87"></div>
		<div class="tsi01-1-12"><img height="75" alt="" src="images/box_i12.gif" width="86"></div>
		</div>
</div>
	</div>
			</div>
			<div class="ts01-1-9"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
			<div class="ts01-1-10"><iframe id=texto_f name="texto_f" src="port-01_logo_0_t.html" width="173" height="152" scrolling="no"></iframe></div>
		  <div class="ts01-1-11"><img height="3" alt="" src="images/strut_16.gif" width="173"></div>
			<div class="ts01-1-12"><img height="24" alt="" src="images/strutc_06.gif" width="42"></div>
			<div class="ts01-1-13"><img height="27" alt="" src="images/strut_17.gif" width="3"></div>
			<div class="ts01-1-14"><img height="24" alt="" src="images/strutc_07.gif" width="43"></div>
			<div class="ts01-1-15"><img height="27" alt="" src="images/strut_18.gif" width="3"></div>
			<div class="ts01-1-16"><img height="24" alt="" src="images/strutc_08.gif" width="54"></div>
			<div class="ts01-1-17"><img height="27" alt="" src="images/strut_19.gif" width="3"></div>
			<div class="ts01-1-18"><img height="24" alt="" src="images/strutc_09.gif" width="25"></div>
			<div class="ts01-1-19"><img height="3" alt="" src="images/strut_20.gif" width="625"></div>
			<div class="ts01-1-20"><img height="3" alt="" src="images/strut_21.gif" width="42"></div>
			<div class="ts01-1-21"><img height="3" alt="" src="images/strut_22.gif" width="43"></div>
			<div class="ts01-1-22"><img height="3" alt="" src="images/strut_23.gif" width="54"></div>
			<div class="ts01-1-23"><img height="3" alt="" src="images/strut_24.gif" width="25"></div>
			<div class="ts01-1-24"><img height="15" alt="" src="images/strutc_01.gif" width="269"></div>
			<div class="ts01-1-25"><img height="15" alt="" src="images/strutc_02.gif" width="269"></div>
			<div class="ts01-1-26"><img height="15" alt="" src="images/strutc_03.gif" width="269"></div>
			<div class="ts01-1-27"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
			<div class="ts01-1-28"><img height="1" alt="" src="images/strut_00.gif" width="266"></div>
			<div class="ts01-1-29"><img height="1" alt="" src="images/strut_00.gif" width="269"></div>
			<div class="ts01-1-30"><img height="1" alt="" src="images/strut_00.gif" width="90"></div>
			<div class="ts01-1-31"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
			<div class="ts01-1-32"><img height="1" alt="" src="images/strut_00.gif" width="42"></div>
			<div class="ts01-1-33"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
			<div class="ts01-1-34"><img height="1" alt="" src="images/strut_00.gif" width="43"></div>
			<div class="ts01-1-35"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
			<div class="ts01-1-36"><img height="1" alt="" src="images/strut_00.gif" width="54"></div>
			<div class="ts01-1-37"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
			<div class="ts01-1-38"><img height="1" alt="" src="images/strut_00.gif" width="25"></div>
			<div class="ts01-1-39"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
		</div>
        		</div>
	</body>
</html>

Duvida Sobre Iframe

27/11/2009, 11:07

Saudações a todos,

Para resolver um problema, criei outro...

Originalmente minha página teria dois iframes que seriam trocados, simultaneamente, através de um link.
Para facilitar:
http://www.darkpanda...te/port-01.html
O "02" trocaria o frame onde esta o DNA e a parte de descrição do mesmo e assim sucessivamente. O problema é que não consegui colocar essa parte onde estão os números dentro da div sem perder as propriedades de rolagem do .js. A solução foi fazer outro iframe, só que agora não faço a menor idéia de como realizar a troca de iframes... O ideal seria arrumar uma solução para colocar a parte dos números dentro das divs sem precisar usar iframe; ai a peregrinação (estudar o código de chamada para os iframes) continua como deveria ser.

Se alguém pudesse ajudar, ficaria agradecido.

PS: Um problema "extra" que tencionava deixar para depois, mas que pode ser incluído aqui é: o negócio só funciona direito no IE, testei no FF e no Opera; em ambos aparece com bug...

Talvez o código do html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR...l4/strict.dtd">
<html>
<head>
<title>port-01</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estrutura/port-01.css" rel="stylesheet" type="text/css">
<link href="estrutura/centralizacao.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<div id="centralizar">
<div id="Table_01" class="ts-1">
<div class="ts-1-1"><img height="3" alt="" src="images/strut_01.gif" width="807"></div>
<div class="ts-1-2"><img height="457" alt="" src="images/strut_02.gif" width="3"></div>
<div class="ts-1-3">
<iframe id=port-01_logo_dna name="port-01_logo_dna" src="port-01_logo_dna.html" width="625" height="454" scrolling="no" frameborder="0" ></iframe>
</div>
<div class="ts-1-4"><img height="457" alt="" src="images/strut_13.gif" width="3"></div>
<div class="ts-1-5"><img height="31" alt="" src="images/port-01_05.gif" width="173"></div>
<div class="ts-1-6"><img height="457" alt="" src="images/strut_14.gif" width="3"></div>
<div class="ts-1-7"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
<div class="ts-1-8">
// Esse é o iframe que não deveria existir //
<iframe id=port-01_b name="port-01_b" src="port-01_b.html" width="173" height="238" scrolling="No" frameborder="0" ></iframe>
</div>
<div class="ts-1-9"><img height="3" alt="" src="images/strut_15.gif" width="173"></div>
<div class="ts-1-10"><iframe id=dna name="port-01_logo_dna_t" src="port-01_logo_dna_t.html" width="173" height="152" scrolling="no"></iframe></div>
<div class="ts-1-11"><img height="3" alt="" src="images/strut_16.gif" width="173"></div>
<div class="ts-1-12"><img height="24" alt="" src="images/strutc_06.gif" width="42"></div>
<div class="ts-1-13"><img height="27" alt="" src="images/strut_17.gif" width="3"></div>
<div class="ts-1-14"><img height="24" alt="" src="images/strutc_07.gif" width="43"></div>
<div class="ts-1-15"><img height="27" alt="" src="images/strut_18.gif" width="3"></div>
<div class="ts-1-16"><img height="24" alt="" src="images/strutc_08.gif" width="54"></div>
<div class="ts-1-17"><img height="27" alt="" src="images/strut_19.gif" width="3"></div>
<div class="ts-1-18"><img height="24" alt="" src="images/strutc_09.gif" width="25"></div>
<div class="ts-1-19"><img height="3" alt="" src="images/strut_20.gif" width="625"></div>
<div class="ts-1-20"><img height="3" alt="" src="images/strut_21.gif" width="42"></div>
<div class="ts-1-21"><img height="3" alt="" src="images/strut_22.gif" width="43"></div>
<div class="ts-1-22"><img height="3" alt="" src="images/strut_23.gif" width="54"></div>
<div class="ts-1-23"><img height="3" alt="" src="images/strut_24.gif" width="25"></div>
<div class="ts-1-24"><img height="15" alt="" src="images/strutc_01.gif" width="269"></div>
<div class="ts-1-25"><img height="15" alt="" src="images/strutc_02.gif" width="269"></div>
<div class="ts-1-26"><img height="15" alt="" src="images/strutc_03.gif" width="269"></div>
<div class="ts-1-27"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts-1-28"><img height="1" alt="" src="images/strut_00.gif" width="266"></div>
<div class="ts-1-29"><img height="1" alt="" src="images/strut_00.gif" width="269"></div>
<div class="ts-1-30"><img height="1" alt="" src="images/strut_00.gif" width="90"></div>
<div class="ts-1-31"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts-1-32"><img height="1" alt="" src="images/strut_00.gif" width="42"></div>
<div class="ts-1-33"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts-1-34"><img height="1" alt="" src="images/strut_00.gif" width="43"></div>
<div class="ts-1-35"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts-1-36"><img height="1" alt="" src="images/strut_00.gif" width="54"></div>
<div class="ts-1-37"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
<div class="ts-1-38"><img height="1" alt="" src="images/strut_00.gif" width="25"></div>
<div class="ts-1-39"><img height="1" alt="" src="images/strut_00.gif" width="3"></div>
</div>
</div>
</body>
</html>
Html


Código da DIV que esta dentro do Iframe (que deveria ser aplicada direta no HTML, mas não funciona por cancelar a funcionalidade dos .js):

<html>
<head>
<title>port-01_08</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estrutura/box_i.css" rel="stylesheet" type="text/css">
<link href="estrutura/box_ci.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="estrutura/box_i.js"></script>
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="InitialiseScrollableArea()">
<div id="divUpControl" style="left: 0px; width: 173; height: 4; top: 0px">
<div align="center"><a href="javascript:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</div>
</div>
<div id="divDownControl" style="left: 0px; width: 173; height: 4; top: 227px">
<center>
<a href="javascript:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</center>
</div>
<div id="divContainer"; top:2; width: 173px; height: 235px; visibility: visible">
<div id="divContent"; top:0; height:144; width: 173px>
<div id="Table_01" class="ts-1">
<div class="ts-1-1"><img height="85" alt="" src="images/box_i01.gif" width="87"></div>
<div class="ts-1-2"><img height="85" alt="" src="images/box_i02.gif" width="86"></div>
<div class="ts-1-3"><img height="75" alt="" src="images/box_i03.gif" width="87"></div>
<div class="ts-1-4"><img height="75" alt="" src="images/box_i04.gif" width="86"></div>
<div class="ts-1-5"><img height="75" alt="" src="images/box_i05.gif" width="87"></div>
<div class="ts-1-6"><img height="75" alt="" src="images/box_i06.gif" width="86"></div>
<div class="ts-1-7"><img height="75" alt="" src="images/box_i07.gif" width="87"></div>
<div class="ts-1-8"><img height="75" alt="" src="images/box_i08.gif" width="86"></div>
<div class="ts-1-9"><img height="75" alt="" src="images/box_i09.gif" width="87"></div>
<div class="ts-1-10"><img height="75" alt="" src="images/box_i10.gif" width="86"></div>
<div class="ts-1-11"><img height="75" alt="" src="images/box_i11.gif" width="87"></div>
<div class="ts-1-12"><img height="75" alt="" src="images/box_i12.gif" width="86"></div>
</div>
</div>
</div>
</body>
</html>
iFrame que deveria constar direto dentro do HTML


Espero que isso ajude um pouco melhor na compreensão do problema para que surja uma solução ( ou, na pior das hipóteses, uma luz no fim do túnel, he, he...)

[Resolvido] Estilos, Scripts E Htmls Separados

26/11/2009, 16:44

Saudações a todos,

Estou tentando resolver alguns problemas para colocar meu portifólio no ar, mas o processo é beeeeeem lento já que sou designer gráfico e entendo pouquíssima coisa de códigos. Mesmo assim, vou me arriscando.

Um dos problemas (tem muitos... :-) é esse: encontrei um código que permite que o rollover das minhas caixas de texto sejam controlados apenas pelo onMouseOver. Até ai blz, ajeitei o treco mais ou menos como queria e funcionou redondo. O código é esse:

Código (inteiro como encontrei)
<html>
<head>
<title>Untitled Document</title>

<STYLE>
P, body, td, tr, div {
scrollbar-base-color: #333333;
scrollbar-shadow-color: #333333;
scrollbar-highlight-color: #333333;
scrollbar-3dlight-color: #333333;
scrollbar-darkshadow-color: #333333;
scrollbar-track-color: #333333;
scrollbar-arrow-color: #000000;
}
</STYLE>

<script language="JavaScript">
<!--
function chama_link(valor){
window.open(valor)
}
function P7_JumpMenu(selObj,restore){ //v1.7 by Project Seven
var theFullString = selObj.options[selObj.selectedIndex].value;
if (restore) selObj.selectedIndex=0;
var theLength = theFullString.length;
var endPos = theFullString.lastIndexOf("~");
var theUrl, theTarget, theParent;
if (endPos > 0)
{theUrl = theFullString.substring(0,endPos);}
else
{theUrl = theFullString;}
endPos++
if (endPos < theLength)
{theTarget = theFullString.substring(endPos,theLength)}
else
{theTarget = "window:Main";}
if (theTarget == "window:New")
{window.open(theUrl);}
else if (theTarget == "window:Main")
{eval("parent.location='"+theUrl+"'");}
else
{eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
//-->
// begin absolutely positioned scrollable area object scripts
// Extension developed by David G. Miles
// Original Scrollable Area code developed by Thomas Brattli
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}

bw=new verifyCompatibleBrowser()
var speed=50
var loop, timer

function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}

function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}

function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".down("+move+")",speed)
}
}

function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".up("+move+")",speed)
}
}

function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}

function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}

var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}
// end absolutely positioned scrollable area object scripts
</script>
<style type="text/css">
#divUpControl{position:absolute; width:4; left:300; top:5; z-index:1; text-align: right}
#divDownControl{position:absolute; width:4; left:300; top:5; z-index:1; text-align: right}
#divContainer{
position:absolute;
width:173;
left:auto;
top:0;
height:144;
overflow:hidden;
clip:rect(0,450,250,0);
visibility:hidden;
}
#divContent{position:absolute; widht:173; height: 144; top:5}
</style>
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="InitialiseScrollableArea()">

<!-- INICIO DA CONFIGURACAO -->
<div id="divUpControl" style="left: 0px; width: 173; height: 4; top: 0">
<div align="center"><a href="javascript:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a></div>
</div>
<div id="divDownControl" style="left: 0px; width: 173; height: 4; top: 132px">
<center><a href="javascript:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</center>
</div>
<div id="divContainer"; top:0; width: 173px; height: 144px; visibility: visible">
<div id="divContent"; top:0; height:144; width: 173px>

These license terms are an agreement between Sysinternals (a wholly owned subsidiary of Microsoft Corporation) and you. Please read them. They apply to the software you are downloading from Systinternals.com, which includes the media on which you received it, if any. The terms also apply to any Sysinternals.

</div>
</div>
<!-- FIM DA CONFIGURACAO -->
</body>
</html>


Só que o negócio ficou meio zoneado, ai resolvi separar tudo:

box_content.css
#divUpControl{
position:absolute;
width:4;
left:300;
top:5;
z-index:1;
text-align:right
}
#divUpControl2{
left:0px;
width:173;
height:4;
top:0"
}
#divDownControl{
position:absolute;
width:4;
left:300;
top:5;
z-index:1;
text-align:right
}
#divDownControl2{
left:0px;
width:173;
height:4;
top:132px"
}
#divContainer{
position:absolute;
width:173;
left:auto;
top:0;
height:144;
overflow:hidden;
clip:rect(0,450,250,0);
visibility:hidden;
}
#divContent{
position:absolute;
widht:173;
height:144;
top:5
}


box_scroll.css
#box_scroll {
P, body, td, tr, div {
scrollbar-base-color: #333333;
scrollbar-shadow-color: #333333;
scrollbar-highlight-color: #333333;
scrollbar-3dlight-color: #333333;
scrollbar-darkshadow-color: #333333;
scrollbar-track-color: #333333;
scrollbar-arrow-color: #000000;
}


box_scroll_area.js
<!--
function chama_link(valor){
window.open(valor)
}
function P7_JumpMenu(selObj,restore){ //v1.7 by Project Seven
var theFullString = selObj.options[selObj.selectedIndex].value;
if (restore) selObj.selectedIndex=0;
var theLength = theFullString.length;
var endPos = theFullString.lastIndexOf("~");
var theUrl, theTarget, theParent;
if (endPos > 0)
{theUrl = theFullString.substring(0,endPos);}
else
{theUrl = theFullString;}
endPos++
if (endPos < theLength)
{theTarget = theFullString.substring(endPos,theLength)}
else
{theTarget = "window:Main";}
if (theTarget == "window:New")
{window.open(theUrl);}
else if (theTarget == "window:Main")
{eval("parent.location='"+theUrl+"'");}
else
{eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
//-->
// begin absolutely positioned scrollable area object scripts
// Extension developed by David G. Miles
// Original Scrollable Area code developed by Thomas Brattli
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}

bw=new verifyCompatibleBrowser()
var speed=50
var loop, timer

function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}

function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}

function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".down("+move+")",speed)
}
}

function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".up("+move+")",speed)
}
}

function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}

function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}

var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}


O Html que não funciona (no processo de limpeza...)
<html>
<head>
<title>Untitled Document</title>
<link href="purgatorio/estrutura/box_content.css" rel="stylesheet" type="text/css">
<link href="purgatorio/estrutura/box_scroll.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="purgatorio/estrutura/box_scroll_area.js"></script>
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="InitialiseScrollableArea()">
<div id="box_scroll">
<div id="divUpControl">
<div align="center">
<a href="javascript:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()">
<img src="images/strutc_00.gif" width="173" height="4" border="0">
</a>
</div>
</div>
</div>
<div id="divDownControl2">
<center><a href="javascript:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"><img src="images/strutc_00.gif" width="173" height="4" border="0"></a>
</center>
</div>
<div id="divContainer">
<div id="divContent">
These license terms are an agreement between Sysinternals (a wholly owned subsidiary of Microsoft Corporation) and you. Please read them. They apply to the software you are downloading from Systinternals.com, which includes the media on which you received it, if any. The terms also apply to any Sysinternals
</div>
</div>
</div>
</body>
</html>


O lance é que não sei fazer as chamadas das functions do .JS no Html, e ainda tenho dúvidas se separei os elementos corretamente (não sei se a "#divDownControl2" e a "#divUpControl2" deveriam existir, se estão colocadads no lugar errado...). Lembrando que não manjo coisa alguma de códigos; faz uma semana que descobri a possibilidade (no sentido de um ser humnano comum conseguir fazê-lo he, he...) de separar os elementos do html e faço tableless com a ajuda de um programa (table2css).

[ ]'s

PS: Como é que se coloca os códigos dentro de boxes (aqui no fórum)?

Resolvido: o problema era erro de caminho (ai não tem código que funcione, he, he...)

<link href="purgatorio/estrutura/box_content.css" rel="stylesheet" type="text/css">

IPB Skin By Virteq