Link para URL não funciona
Peguei esse script de banner no site Script Brasil, entendo pouco de programação (quase nada de js) mas o script é até bastante simples e fácil de configurar.
Acontece que os links das imagens para cada banner não está funcionando corretamente.
Alguém consegue me ajudar a corrigir esse problema por favor???
Página js
var coverimage = new Array()coverimage[0]="stripes0.jpg"coverimage[1]="stripes1.gif"coverimage[2]="stripes2.gif"coverimage[3]="stripes3.gif"coverimage[4]="stripes4.gif"coverimage[5]="stripes5.gif"coverimage[6]="stripes6.gif"coverimage[7]="stripes7.gif"var covimgpreload=new Array()for (i=0;i<=coverimage.length-1;i++) { covimgpreload[i]=new Image() covimgpreload[i].src=coverimage[i]}var i_messages=0var i_loop=0var thisurl=0var timervar coverwidthvar coverheightstandstill=standstill*1000var contentif (fontweight=="yes") { fontweight="<b>"} else {fontweight=""}function init() { content="<table width='"+messagewidth+"' height='"+messageheight+"' border='"+borderwidth+"'>" content+="<tr valign='"+messagevalign+"'><td align='"+messagealign+"' bgcolor='"+backgroundcolor+"'>" content+="<font size='"+fntsize+"' face='"+fntface+"' color='"+fntcolor+"'>" content+=fontweight content+=message[i_messages] content+="</font></td></tr></table>" if (document.all) { document.all.messagebox.style.posTop=messages_top document.all.messagebox.style.posLeft=messages_left document.all.cover.style.posTop=messages_top document.all.cover.style.posLeft=messages_left messagebox.innerHTML=content coverwidth=messagebox.offsetWidth coverheight=messagebox.offsetHeight cover.innerHTML="<a href='javascript:gotourl()' target='_blank'><img width="+coverwidth+" height="+coverheight+" name='imgcover' src='"+coverimage[i_loop]+"' border=0></a>" enlargehearts() } if (document.layers) { document.messagebox.top=messages_top document.messagebox.left=messages_left document.cover.top=messages_top document.cover.left=messages_left document.messagebox.document.write(content) document.messagebox.document.close() coverwidth=document.messagebox.document.width coverheight=document.messagebox.document.height document.cover.document.write("<a href='javascript:gotourl() target='_blank''><img width="+coverwidth+" height="+coverheight+" name='imgcover' src='"+coverimage[i_loop]+"' border=0></a>") document.cover.document.close() enlargehearts() }}function enlargehearts() { if (i_loop<=coverimage.length-1) { if (document.all) { imgcover.src=coverimage[i_loop] } if (document.layers) { document.cover.document.imgcover.src=coverimage[i_loop] } i_loop++ timer= setTimeout("enlargehearts()",pause) } else { clearTimeout(timer) i_loop-- timer= setTimeout("shrinkhearts()",standstill) }}function shrinkhearts() { if (i_loop>=0) { if (document.all) { imgcover.src=coverimage[i_loop] } if (document.layers) { document.cover.document.imgcover.src=coverimage[i_loop] } i_loop-- timer= setTimeout("shrinkhearts()",pause) } else { clearTimeout(timer) i_loop=0 i_messages++ if (i_messages>=message.length) {i_messages=0} content="<table width='"+messagewidth+"' height='"+messageheight+"' border='"+borderwidth+"'>" content+="<tr valign='"+messagevalign+"'><td align='"+messagealign+"' bgcolor='"+backgroundcolor+"'>" content+="<font size='"+fntsize+"' face='"+fntface+"' color='"+fntcolor+"'>" content+=fontweight content+=message[i_messages] content+="</font></td></tr></table>" if (document.all) { messagebox.innerHTML=content } if (document.layers) { document.messagebox.document.write(content) document.messagebox.document.close() } timer= setTimeout("enlargehearts()",(4*pause)) }}function gotourl() { document.location.href=messageboxlink[i_messages]}window.onload=init
página banner.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[http://www.w3.org/TR/html4/loose.dtd">http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}--></style></head><body><script LANGUAGE="JavaScript"><!-- Beginning of JavaScript -// the messages. Add as many as you like.var message=new Array()message[0]='<img src="../img/logokaram_pq.jpg">'message[1]='<img src="../img/logomm.jpg">'message[2]='<img src="../img/logorc.gif">'message[3]='<img src="../img/logomake.jpg">'// links for each messagevar messageurl = new Array()messageurl[0]=""messageurl[1]=""messageurl[2]="[http://www.rcdesignbrasil.com"messageurl[3]=""//](http://www.rcdesignbrasil.com) fontsize, font and fontcolorvar fntsize=2var fntface="Verdana"var fntcolor="black"// fontweight (values: "yes" or "no")var fontweight="yes"// background-color of messageboxvar backgroundcolor="white"// width and the height of the messagebox (pixels)var messagewidth="180"var messageheight="100"// width of messagebox border var borderwidth="0"// horizontal and the vertical position of the messages in relation to the messageboxvar messagealign="center"var messagevalign="middle"// vertical position of the messagebox (distance to the top margin of the webpage, pixels)var messages_top=0// horizontal position of messagebox (distance to the left margin of the webpage, pixels)var messages_left=0// speed of the transition effect. Less means fastervar pause=30// standstill-time of messages (seconds)var standstill=3// - End of JavaScript - --></SCRIPT><script SRC="texttransliner.js"></SCRIPT><DIV ID="messagebox" style="position:absolute"> </DIV><DIV ID="cover" style="position:absolute"> </DIV></body></html>Discussão (6)
Carregando comentários...