Ir para conteúdo

POWERED BY:

Arquivado

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

nfmi

scripts não funcionam no firefox|netscape

Recommended Posts

tenho scripts que não funcionam em navegadores como firefox e netscape. <_<

e não sei como fazer ele funcionar em firefox e netscape.

 

este abaixo é o controlador de rolar noticias.

<style type="text/css">#divControl{position:absolute; width:250; font-family:arial; left:25; top:80; font-size:10pt; visibility:hidden}#divCont{position:absolute; top:120; left:40; clip:rect(0,370,100,0); height:100; width:370}.clScroll{position:absolute; top:0; font-size:9pt; left:0; font-family:arial; visibility:hidden}</style><script type="text/javascript" language="JavaScript">//Default browsercheck, added to all scripts!function checkBrowser(){	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 checkBrowser()/*********************************************************************************These are the variables you have to set:*********************************************************************************///The speed of the timeout between each scroll.timSpeed=50//The height of the container (change this when it scrolls to much or to little)contHeight=100/*********************************************************************************This is the object constructor function, which applies methods and properties to the Cross-browser layer object*********************************************************************************/function makeScrollObj(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.height=bw.ns4?this.css.document.height:this.el.offsetHeight	this.top=b_gettop          	return this}//Getting the top for the top methodfunction b_gettop(){	var gleft=(bw.ns4 || bw.ns5) ? eval(this.css.top):eval(this.css.pixelTop);	return gleft;}//Variablesvar scrollTim;var active=0;/*********************************************************************************The scroll function. Checks what way to scroll and checks if thelayer is not already on top or bottom.*********************************************************************************/function scroll(speed){	clearTimeout(scrollTim)	way=speed>0?1:0	if((!way && oScroll[active].top()>-oScroll[active].height+contHeight) || (oScroll[active].top()<0 && way)){  oScroll[active].css.top=oScroll[active].top()+speed  scrollTim=setTimeout("scroll("+speed+")",timSpeed)	}}//Clears the timeout so the scroll stops, this is called onmouseout.function noScroll(){	clearTimeout(scrollTim)}/*********************************************************************************Changes the active layer. Hides the one that's visible andshows the "new" one. Also set's the new layers top to0 so it starts at top.*********************************************************************************/function changeActive(num){	oScroll[active].css.visibility='hidden'	active=num	oScroll[active].css.top=0	oScroll[active].css.visibility='visible'}/*********************************************************************************Initilizes the page, makes a oScroll Array and calls the object constructor.Here you can add as many scrollObjects as you want*********************************************************************************/function scrollInit(){	oScroll=new Array()	oScroll[0]=new	makeScrollObj('divScroll1','divCont')	oScroll[0].css.visibility='visible'	oControl=new makeScrollObj('divControl')	oControl.css.visibility='visible'}/*********************************************************************************Executa a função scrollInit quando a página for carregada *********************************************************************************/onload=scrollInit;</script>

 

essa é a página onde ele carrega as noticias

<div id="divControl">     	 <table width="430" border="0">        <tr><td align="left">       	 <a href="#" onmouseover="scroll(5)" onmouseout="noScroll()"><img src="imagens/sobe.gif" border="0"></a><p>       	 <a href="#" onmouseover="scroll(-5)" onmouseout="noScroll()"><img src="imagens/desce.gif" border="0"></a></td></tr>     	 </table>      </div>        <div id="divCont">     	 <div id="divScroll1" class="clScroll">     	         <table width="370" border="0">       	 <tr class="ptituloartigos">          <td width="2"></td>          <td width="100%"  ><b><? echo $titulo; ?></b></td>       	 </tr>       	 <tr>          <td height="5"></td>       	 </tr>       	 <tr>          <td width="2"></td>          <td class="h_conteudoartigos"><? echo $noticia; ?></td>       	 </tr>       	 <tr>          <td height="10"></td>       	 </tr>       	 <!--        	 <tr>          <td width="2"></td>          <td class="h_conteudoartigos">para visualizar as fotos clique aqui.</td>       	 </tr>       	 -->        </table>     	      	 </div>      </div>

SE SOUBER COMO FAÇO ISSO SEM USAR ESSE SCRIPT ... valeu ! http://forum.imasters.com.br/public/style_emoticons/default/joia.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

E ai beleza ... :D

 

olhei o site que tu me passou e não achei o exemplo que precisava que é asim:

 

colocar o mouse em cima da seta e ele sobe e desce o texto como tem em paginas de noticia,mais no site só tem essas "frescuras" de texto que explode gira e tal. queria algo mais simples !

 

tem algum tuto ou site com isso ? :mellow:

 

http://forum.imasters.com.br/public/style_emoticons/default/joia.gif

valeu

abraço !

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.