13/01/2011, 07:17
|
| | Fecha de Ingreso: enero-2011 Ubicación: san guillermo
Mensajes: 1
Antigüedad: 14 años Puntos: 0 | |
Problemas con codigo javascript en cromey mozilla hola gente del foro nececito ayuda, soy nuevo en java script y encontre un codigo de un scroll de noticias y me funcion solamente en Ie y no me anda en google crome o mozilla
el codig oes el siguiente
<script language="JavaScript1.2">
//************************************************** ***
//SCRIPT DE ESCROLL DE NOTICIAS DESDE UNA BASE DE DATOS
//************************************************** ***
// ancho
var marqueewidth=200
// alto
var marqueeheight=20
// velocidad
var speed=2
// contenido del scrolL
var marqueecontents='<%
Dim oConn1, RS1, sql1, tabla1
SET oConn1 = Server.CreateObject("ADODB.Connection")
SET RS1 = Server.CreateObject("ADODB.RecordSet")
oConn1.Open = "noticias"
tabla1 = "TblNoticias"
sql1 = "SELECT * FROM "& Trim(tabla1)
RS1.Open sql1, oConn1, 3, 1
do while not RS1.eof
response.write("<p><a href=" & CHR(34) & RS1.FIELDS("VINCULO") & CHR(34) & " target=" & CHR(34) & "_blank" & CHR(34) & " class=" & CHR(34) & "Estilo1" & CHR(34) & ">" & RS1.FIELDS("TITULO") & "</a></p><p>" & RS1.FIELDS("NOTA") & "</p>")
RS1.movenext
loop
%>'
if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheig ht+'">'+marqueecontents+'</marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",250)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.w rite(marqueecontents)
document.cmarquee01.document.cmarquee02.document.c lose()
thelength=document.cmarquee01.document.cmarquee02. document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thel ength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",400)
}
else{
document.cmarquee01.document.cmarquee02.top=marque eheight
scrollit()
}
}
window.onload=regenerate2
//************
// FIN SCRIPT
//************
</script>
Por favor si alguien sabe como hacerlo andar en todos los navegadores se los agradecería |