Dúvidas em DHTML

1 resposta
oliveirarenan

Pessoal,

Estou com um probleminha e gostaria de ajuda.

Tenho um site que quero colocar um marquee vertical em DHTML (do mesmo jeito q esta feito o horizontal).

Mas quando eu rodo a aplicação, o marqui fica em cima da página e joga o resto para baixo.
Quem rodar a aplicação irá ver.
O marquee horizontal, eu quero deixar dentro da caixa de texto no centro superior.

Quem quiser e puder me ajudar mande um PM que eu envio o código por e-mail.
Não consigo anexar o código aqui.

Falow

1 Resposta

oliveirarenan

Pessoal, segue uma parte do código.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://www.natura.net/port/hp/main.asp? -->
<!-- cód. p/ leitura randômica do banner do hotsite de faces -->
<!-- fim do cód. p/ leitura randômica do banner do hotsite de faces -->
<!-- SCRIPTS UTILIZADOS NA HOME -->
<HTML>

<HEAD>
<TITLE>Natura Cosméticos</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
/*
** SCRIPT PARA A ROLAGEM HORIZONTAL
**/
	// By Ernst Straka ([email removido] http://www.rs-systems.at/straka)
	// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
	var l1 =   176; // left of ticker in pixel, or 0 to position relative
	var t1 =   8; // top of ticker in pixel, or 0 to position relative
	var w1 = 440; // width of ticker in pixel
	var ie = document.all ? true : false;
	var first = true;
	var l2 = l1 + w1;
	var l3 = l1 - l2;
	var l = l2;
	function tickinit() {
	if (ie) {
	if (l1 == 0 && t1 == 0) {
	pos = document.all['tickpos'];
	l1 = getLeft(pos);
	t1 = getTop(pos);
	}
	ticktext.style.posTop = t1;
	}
	else {
	if (l1 == 0 && t1 == 0) {
	pos = document.anchors['tickpos'];
	l1 = pos.x;
	t1 = pos.y;
	}
	document.ticktext.pageY = t1;
	}
	l2 = l1 + w1;
	l3 = l1 - l2;
	l = l2;
	setInterval('tick()',100);
	}
	function getLeft(ll) {
	if (ll.offsetParent)
	return (ll.offsetLeft + getLeft(ll.offsetParent));
	else 
	return (ll.offsetLeft);
	}
	function getTop(ll) {
	if (ll.offsetParent)
	return (ll.offsetTop + getTop(ll.offsetParent));
	else
	return (ll.offsetTop);
	}
	function tick() {
	l = l - 10;
	if (l < l3) l = l2;
	cl = l1 - l;
	cr = l2 - l;
	if (ie) {
	ticktext.style.posLeft = l;
	ticktext.style.posTop = t1;
	ticktext.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
	if (first) ticktext.style.visibility = "visible";
	}
	else {
	document.ticktext.pageX = l;
	document.ticktext.clip.left = cl;
	document.ticktext.clip.right = cr;
	if (first) document.ticktext.visibility = "show";
	}
	first = false;
	}

/*
** SCRIPT PARA A ROLAGEM VERTICAL
**/
	//Specify the marquee's width (in pixels)
	var marqueewidth="200px"
	//Specify the marquee's height
	var marqueeheight="150px"
	//Specify the marquee's marquee speed (larger is faster 1-10)
	var marqueespeed=2
	//Pause marquee onMousever (0=no. 1=yes)?
	//var pauseit=1

	var marqueecontent='<TABLE cellspacing="2" cellpadding="2" width="145" bgcolor="#ebebeb" border="0"><TR valign="center" bgcolor="#ffffff"><TD><TABLE cellspacing="0" cellpadding="0" width="95%" align="center" border="0"><TR><TD width="9" height="25"></TD></TR></TABLE><TABLE cellspacing="0" cellpadding="0" width="100%" border="0"><TR><TD valign="top"><FONT size="+0"></FONT></TD><TD height="10"><A class="cinzabeb" href="http://www.natura.net/port/natura_ca.asp?site=1593" target="_top">&nbsp;consultoria virtual</A></TD></TR><TR><TD valign="top"><IMG height="11" src="main_files/ico_seta_links.gif" width="7" border="0"></TD><TD height="10"><A class="cinzabeb" href="http://www.natura.net/port/comorevender/comorevender.asp">&nbsp;como revender</A></TD></TR><TR><TD valign="top"><IMG height="11" src="main_files/ico_seta_links.gif" width="7" border="0"></TD><TD height="10"><A class="cinzabeb" href="http://www.natura.net/port/cadastro/localizador_cn.asp">&nbsp;encontre uma consultora</A></TD></TR><TR><TD valign="top"><IMG height="11" src="main_files/ico_seta_links.gif" width="7" border="0"></TD><TD><A class="cinzabeb" href="http://webappl.natura.net/s_dir/sid.nsf/Denuncia?OpenForm">&nbsp;denuncia de venda&nbsp; irregular</A></TD></TR><TR><TD valign="top"><IMG height="11" src="main_files/ico_seta_links.gif" width="7" border="0"></TD><TD><A class="cinzabeb" href="http://www.natura.net/lojainternacional" target="_parent">&nbsp;loja internacional <FONT color="#e76b23">*novo</FONT></A></TD></TR></TABLE>'

	marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
	var copyspeed=marqueespeed
	//var pausespeed=(pauseit==0)? copyspeed: 0
	var iedom=document.all||document.getElementById
	var actualheight=''
	var cross_marquee, ns_marquee

	function populate(){
		if (iedom){
			cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
			cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
			cross_marquee.innerHTML=marqueecontent
			actualheight=cross_marquee.offsetHeight
		}else if (document.layers){
			ns_marquee=document.ns_marquee.document.ns_marquee2
			ns_marquee.top=parseInt(marqueeheight)+8
			ns_marquee.document.write(marqueecontent)
			ns_marquee.document.close()
			actualheight=ns_marquee.document.height
		}
		lefttime=setInterval("scrollmarquee()",20)
	}
	window.onload=populate

	function scrollmarquee(){
		if (iedom){
			if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
				cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
			else
				cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
		}else if (document.layers){
			if (ns_marquee.top>(actualheight*(-1)+8))
				ns_marquee.top-=copyspeed
			else
				ns_marquee.top=parseInt(marqueeheight)+8
		}
	}

	if (iedom||document.layers){
		with (document){
			if (iedom){
				write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseout="copyspeed=marqueespeed">')
				write('<div id="iemarquee" style="position:relative;left:10px;top:0px;width:100%;">')
				write('</div></div>')
			}
			else if (document.layers){
				write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">')
				write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=10 top=0  onMouseout="copyspeed=marqueespeed"></layer>')
				write('</ilayer>')
			}
		}
	}
</script>

<SCRIPT language="JavaScript1.2" src="main_files/hiermenus_new.js"></SCRIPT>

<META charset="iso-8859-1" http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT language="JavaScript1.2" src="main_files/main.js" type="text/javascript"></SCRIPT>
<META content="MSHTML 6.00.2900.2523" name="GENERATOR">
</HEAD>

<BODY vlink="#ffffff" alink="#ffffff" link="#ffffff" bgcolor="#ffffff" leftmargin="0" topmargin="0" onload="tickinit()" marginheight="0" marginwidth="0">
		<a name="tickpos"></a>
			<div id="ticktext" style="position: absolute; color: #ff6600; font-family: arial; font-size: 14pt; visibility: hidden; left: 248px; top: 8px; width: 366px; height: 24">
			<nobr>Teste teste teste teste teste teste teste</nobr>
			</div>


<DIV id="TipLayer" style="Z-INDEX: 1003; VISIBILITY: hidden; POSITION: absolute; TOP: -100px">
</DIV>
<SCRIPT language="JavaScript1.2">
tickinit();
</SCRIPT>

<SCRIPT language="JavaScript1.2" src="main_files/style.js" type="text/javascript">

</SCRIPT>
<LINK href="main_files/natura.css" type="text/css" rel="stylesheet">
<META content="creme hidratante , espuma de barbear , pós-barba , adstringente , hidratante , maquilagem , maquiagem , cosméticos , shampoo , condicionador , sabonete , perfume , perfumaria , proteção solar , protetor solar , desodorante , batom , blush , sombra , gloss , rímel , pó compacto , corretivo , delineador , máscara para cílios , óleo trifásico , demaquilante , chronos , ekos , faces , mamãe e bebê , mamãe &amp; bebê , MMBB , Kaiak , interage , interage natura , tratamento caspa , tratamento queda , fotoequilíbio , séve , sr Nhorus , sintonia Natura , kriska , biografia de natura , tarot de natura , lua de Natura , sol de Natura , sintonia de Natura , essencial de Natura , revelar de Natura , intuição" name="keywords">
<IMG height="5" src="main_files/pxl_transp.gif" width="10"><BR>
<TABLE cellspacing="0" cellpadding="0" width="770" border="0">
	<TR>
		<TD valign="top" align="middle" width="150">
		<SCRIPT language="javascript">
var op_pai='';
var op_filho='';
var op_m='1';


function Envia()
{
	if (document.formSearch.UserRestriction.value == "") 
	{
		alert('Esqueceu de especificar a Palavra-Chave.');
		return false;
	}
	else
	{
		document.formSearch.action = '/port/busca/busca_produto.asp';
		return true;
	}
}
</SCRIPT>

		<SCRIPT language="JavaScript" src="main_files/functionMenu.js"></SCRIPT>
		<LINK href="main_files/natura.css" rel="stylesheet">
		<!--include virtual="/port/include/fora_do_ar.asp"-->
		<TABLE cellspacing="0" cellpadding="1" width="150" border="0">
			<TR>
				<TD width="5">&nbsp;</TD>
				<TD>
				<!-- include cantinho da cn -->
				<!--Luciano -->
				<!--não  logado-->
				<!-- verifico se está no site pessoal-->
				<!-- banner localizador de CN´s -->
				<IMG height="68" src="main_files/bnr_consultora2_145x120.jpg" width="145"><BR>
				<A onmouseover="MM_swapImage('sou','','/port/include/images/consultora_02_01.gif',1)" onmouseout="MM_swapImgRestore()" href="http://www.natura.net/port/hp/hp_branca_consultoria.asp" target="_top">
				<IMG height="18" src="main_files/consultora_01_01.gif" width="145" border="0" name="sou"></A><BR>
				<A onmouseover="MM_swapImage('quero','','/port/include/images/consultora_02_02.gif',1)" onmouseout="MM_swapImgRestore()" href="http://www.natura.net/port/comorevender/comorevender.asp">
				<IMG height="17" src="main_files/consultora_01_02.gif" width="145" border="0" name="quero"></A><BR>
				<A onmouseover="MM_swapImage('encontrar','','/port/include/images/consultora_02_03.gif',1)" onmouseout="MM_swapImgRestore()" href="http://www.natura.net/port/cadastro/localizador_cn.asp">
				<IMG height="17" src="main_files/consultora_01_03.gif" width="145" border="0" name="encontrar"></A>



				<TABLE cellspacing="2" cellpadding="2" width="145" bgcolor="#ebebeb" border="0">
					<TR valign="center" bgcolor="#ffffff">
						<TD>
							<SCRIPT language="JavaScript1.2">
							populate();
							</SCRIPT>
						</TD>
					</TR>
				</TABLE>
				</TD>
			</TR>
		</TABLE>
		</TD>
		<TD valign="top" width="15">&nbsp;</TD>
		<TD valign="top" align="middle" width="460">
		<FIELDSET class="laranja_10">
		<DIV align="center">
			<TABLE border="0" width="100%" id="table1">
				<TR>
					<TD>&nbsp;</TD>
				</TR>
			</TABLE>
		</DIV>
		</FIELDSET>
		<TABLE cellspacing="0" cellpadding="0" width="98%" align="center" border="0">
			<TR>
				<TD valign="top">
				<IMG height="5" src="main_files/pxl_transp.gif" width="10"> </TD>
				<TD><IMG height="10" src="main_files/pxl_transp.gif" width="10"></TD>
				<TD valign="bottom">
				<IMG height="5" src="main_files/pxl_transp.gif" width="10"></TD>
			</TR>
			<TR>
				<TD valign="top">
				<!-- lançamentos -->
				<TABLE cellspacing="0" cellpadding="0" border="0">
					<TR valign="top">
						<TD><IMG src="main_files/tl_lancamentos.gif"></TD>
					</TR>
				</TABLE>
				<TABLE cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
					<TR valign="top">
						<TD width="1" background="main_files/pont.gif">
						<IMG height="10" src="main_files/pxl_transp.gif" width="1" align="top"></TD>
						<TD width="10">
						<P>
						<IMG height="15" src="main_files/pxl_transp.gif" width="10" border="0"></P>
						</TD>
						<TD>
						<TABLE cellspacing="0" cellpadding="0" width="100%" border="0">
							<TR valign="top">
								<TD width="65">
								<IMG height="10" src="main_files/pxl_transp.gif" width="10"><BR>
								<A href="http://www.natura.net/port/produtos/detalhe_produto.asp?productId=6707&StructId=2&BCT=Lançamentos,Natura Colorplant Shampoo para Cabelos tingidos ou com mechas&strStructId=0,0">
								<IMG height="60" src="main_files/T_06707.jpg" width="60" border="0"></A></TD>
								<TD valign="top">
								<P>
								<IMG height="10" src="main_files/pxl_transp.gif" width="10"><BR>
								<FONT face="Verdana, Arial, Helvetica, sans-serif" size="1">
								<B>
								<A href="http://www.natura.net/port/produtos/detalhe_produto.asp?productId=6707&StructId=2&BCT=Lançamentos,Natura Colorplant Shampoo para Cabelos tingidos ou com mechas&strStructId=0,0">
								<FONT color="#e76b23">Natura Colorplant Shampoo 
								para Cabelos tingidos ou com mechas</FONT></A></B></FONT></P>
								</TD>
				
							</TR>
							<TR valign="top">
								<TD width="65">&nbsp;</TD>
								<TD colspan="2">
								<A href="http://www.natura.net/port/produtos/detalhe_produto.asp?productId=6707&StructId=2&BCT=Lançamentos,Natura Colorplant Shampoo para Cabelos tingidos ou com mechas&strStructId=0,0">
								<FONT face="Verdana, Arial, Helvetica, sans-serif" color="#848284" size="1">
								</FONT></A></TD>
							</TR>
							<TR valign="top">
								<TD width="65">
								<IMG height="10" src="main_files/pxl_transp.gif" width="10"></TD>
								<TD colspan="2">
								<IMG height="10" src="main_files/pxl_transp.gif" width="10"></TD>
							</TR>
						</TABLE>
						</TD>
					</TR>
				</TABLE>
			</TR>
		</TABLE>
		<BR>
</BODY>

</HTML>

Eu preciso colocar a rolagem vertical em baixo da ficura do canto inferior esquerdo.

Grato,

Criado 3 de novembro de 2004
Ultima resposta 3 de nov. de 2004
Respostas 1
Participantes 1