Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/10/2009, 12:04
Avatar de Superlinux
Superlinux
 
Fecha de Ingreso: octubre-2005
Ubicación: Colombia
Mensajes: 662
Antigüedad: 18 años, 6 meses
Puntos: 1
Respuesta: Varios scroll a la vez

aunque este es un tema de php ... aqui te dejo un ejamplo, de esta forma lo hago... con este codigo creo el scroll y le paso los datos a visualizar

Código PHP:
<html>
<head>
<link href="css/estilos.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
var timer;           
var amount = 2;      
var stoped = true;
function initMarquee(marId){
    if(document.getElementById(marId)){
        if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 3)){        
           document.getElementById(marId).scrollAmount=document.getElementById(marId).clientWidth;
         }
         else{
           document.getElementById(marId).scrollAmount=amount;
         }         
    }
}

function startMarquee(marId){
    var marObj = document.getElementById(marId);
    marObj.scrollAmount = amount;
    marObj.start(); 
    clearTimeout(timer);  
    stoped = true;
    marObj.onscroll=function(){scrolling(this);};
}

function scrollMarquee(marObj, waitTime){    
    if(!stoped && marObj.scrollLeft <= marObj.clientWidth){
       marObj.stop();         
       timer = setTimeout("startMarquee('"+marObj.id+"')", waitTime);
    }
}

function scrolling(marObj){     
    marObj.stop();
    marObj.scrollAmount = amount;
    marObj.start();
 
}
</script>
</head>

<body>
<marquee scrollamount="1" id="esparticulos" onscroll="scrollMarquee(this, 0)" behavior="scroll" direction="left" onMouseOver="this.stop()" onMouseOut="scrolling(this)" width="530">
<?php 
$regusuario 
$sql->seleccionarLibre("SELECT * FROM regusuario where isActive=1 ORDER BY rand()"); 
                    
foreach(
$regusuario as $reg)
{
    
//Separa el numero de telefono en indicativo pais, indicativo ciudad y numero telefonico

    
$telefono1pri explode(" ",$reg[telefono1]);
    
$indicativociudad1 $telefono1pri[1];

    if(
$indicativociudad1==true){
        
$indicativopais1 $telefono1pri[0];
        
$telefono1sec explode("-",$telefono1pri[1]);
        
$indicativociudad1 $telefono1sec[0];
        
$telefono1 $telefono1sec[1];
        
$sky1 $indicativopais1.''.$indicativociudad1.''.$telefono1;
    }else{
        
$telefono1pri explode("-",$reg[telefono1]);
        
$indicativopais1 $telefono1pri[0];
        
$telefono1 $telefono1pri[1];
        
$sky1 $indicativopais1.''.$telefono1;
    }
//Fin del if
    
    
$esp $sql->seleccionar("especialista","*","IdUsuario=".$reg["IdUsuario"]." AND idEspecialidad=".$noticia[idEspecialidad]);
    
    if(
$esp){
        
$espec $sql->seleccionar("especialidad","*","idEspecialidad=".$esp[idEspecialidad]);
        
$ciudad $sql->seleccionar("ciudad","*","idCiudad=".$esp[idCiudad]);
        
?>
            &nbsp;&nbsp;<span class="tituloazul">***</span>&nbsp;&nbsp;<a href="ver_especialistas.php?ide=<? echo $esp[idEspecialista]; ?>&idc=<? echo $esp[idCiudad]; ?>&ids=<? echo $esp[idSubespecialidad]; ?>" class="a_small"><?php echo $reg[dr].' '.$reg[nombres].' '.$reg[apellidos].' ( '.strtoupper($espec[nombre]).' - '.strtoupper($ciudad[nombre]).' )' ?></a>
        <?php     
    
}//Fin del if
}//Fin del foreach
?>
</marquee>
</body>
</html>
y luego los visualizo dependiendo de una condicion

Código PHP:
<?php //Archivo de conexion
require("connect.php");

$tipo "especialistas";
$query "select * from articulos where activo=1 and tipo='".$tipo."' ORDER BY rand()";
$noticias $sql->seleccionarlibre($query);

?>
<html>
<head>
<title>Ver Articulos especialistas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
<table width="535" border="0" cellpadding="0" cellspacing="0">
<?php

// ---------- PRODUCTS LIST ---------------------------------------
$contador 0;

if(
$noticias){
    
$c=0;
    foreach(
$noticias as $noticia){ 
        
$contador $contador 1;
        if(
$contador <= 10){
           
?>
           <tr>
             <td height="12" colspan="2" valign="center">
                 <div class="container">
                     <table width="530" height="10" cellpadding="0" cellspacing="0">
                       <tr>
                         <td><? include("scroller_ver_esparticulos.php"); ?></td>
                       </tr>
                     </table>
                 </div></td>
            </tr>
           <?php
        
}//Fin del if
    
}//Fin del foreach
}else{
    echo 
"<p align=\"center\" ><strong> No hay articulos recientes </strong> </p>";
}
//Fin del if
//----------------------------------------------------------------------
?>
</table>
</body>
</html>

espero te sirva ...
__________________
"La vida sigue su curso, tú toma parte de ella."