Foros
Contenido de variables dinámico
Autor Fecha: 23 de Diciembre del 2006 a las 13:22:31   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Edad: 21 años
Ubicación: Poza Rica, Veracruz
País:
Mensajes: 1269
Pues si todo lo hiciste tal y como dije... no debia de haber ningún problema... Muy bien
Individual Perfil Privado Website
Autor Fecha: 23 de Diciembre del 2006 a las 15:58:49   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Mensajes: 344
Dijiste algo de precarga de scripts... que no entendí bien...

Creo que ese script esta solo para funcionar con cada imagen que se muestre, no cada imagen que se muestre en otro script, pero no estoy seguro, eso parece, ya que si lo he hecho todo bien, y solo me sale ese efecto en la imagen que está puesta por defecto...

Saludos.
Individual Perfil Privado
Autor Fecha: 23 de Diciembre del 2006 a las 17:02:07   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Edad: 21 años
Ubicación: Poza Rica, Veracruz
País:
Mensajes: 1269
luis_adolfo (Osea yo) escribió:
... seria obligatorio donde va id... la url de la imagen, si existiera un sistema de precarga en el script... pero no lo hay...


Dije... sistema de precarga EN el script no DE scripts... eso es otra cosa...

Hay scripts que aparte de realizar un efecto sobre una imagen, la precargan para que cargue rapidamente, cuando esta sea solicitada... pero revise el script citado anteriormente, y no vi nada de eso... tambien vi que podia aceptar varias imagenes desde un script... y NO como tu dices, que probablemente se necesitaria un script para cada imagen... yo estoy basandome en la programación del script para decir esto...

Y es más, haré un ejemplo en html, usando un script y realizando el efecto sobre 10 imagenes, tomando en cuenta todo lo que he mencionado...

Código
<html>
<head>
<title>Prueba del script...</title>
</head>

<body>
<script type="text/javascript">
<!--
function initImage&#40;id&#41; &#123;
image = document.getElementById&#40;id&#41;;
setOpacity&#40;image, 0&#41;;
image.style.visibility = "visible";
fadeIn&#40;id,0&#41;;
&#125;
function fadeIn&#40;objId,opacity&#41; &#123;
if &#40;document.getElementById&#41; &#123;
obj = document.getElementById&#40;objId&#41;;
if &#40;opacity <= 100&#41; &#123;
setOpacity&#40;obj, opacity&#41;;
opacity += 10;
window.setTimeout&#40;"fadeIn&#40;'"+objId+"',"+opacity+"&#41;", 100&#41;;
&#125;
&#125;
&#125;
function setOpacity&#40;obj, opacity&#41; &#123;
opacity = &#40;opacity == 100&#41;?99.999&#58;opacity;
// IE/Win
obj.style.filter = "alpha&#40;opacity&#58;"+opacity+"&#41;";
// Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;
// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;
// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
&#125;

// -->
</script>

<img src="http&#58;//www.imagemozilla.com/images/74709hollywoodbash.gif" width="104" height="70"  id="1" onLoad="initImage&#40;'1'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/249406iceslide.gif" width="104" height="70"  id="2" onLoad="initImage&#40;'2'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/132420deadtreedefender.gif" width="104" height="70"  id="3" onLoad="initImage&#40;'3'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/806869polarboar.gif" width="104" height="70"  id="4" onLoad="initImage&#40;'4'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/500373spindoctor.gif" width="104" height="70"  id="5" onLoad="initImage&#40;'5'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/38170attackofthesprouts.gif" width="104" height="70"  id="6" onLoad="initImage&#40;'6'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/854943havoc_mountain.jpg" width="104" height="70"  id="7" onLoad="initImage&#40;'7'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/75991applehunt.gif" width="104" height="70"  id="8" onLoad="initImage&#40;'8'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/677949snowline.gif" width="104" height="70"  id="9" onLoad="initImage&#40;'9'&#41;;">
<img src="http&#58;//www.imagemozilla.com/images/618381santafartypants.gif" width="104" height="70"  id="10" onLoad="initImage&#40;'10'&#41;;">

</body>
</html>

Ves??... el ejemplo funcionó a la perfección... nunca lo habia probado, pero sabia que hacia, y como funcionaba con solo leer su programación...

Ahora cito algo que dijiste...

Dreagnout escribió:
...como podría aplicarle este efecto a cada imagen?... Como está en html, y hay que pasarlo a php, pues me lio


Aquí claramente me estas pidiendo que se aplique el efecto en cada imagen del bloque, y como verás eso se hizo, y de paso se paso el script a php para que no tuvieras problemas.

Mira, la situación está, en que no me explicaste bien lo que querias, y si esta bien lo que te dije, pero habria que hacer algunos cambios... viendo el script y el bloque de tu web, supuse que quieres (supuse, porque no me lo dijiste claramente)...

Tu quieres que al cambiar de juego o animacion (contenido)... se aplique ese efecto en la imagen... pero resulta que el efecto se aplica cuando la imagen carga... al entrar a tu web, se cargan las 10 imagenes del bloque, y se ve el efecto en la primer imagen... pero no se ve el efecto en las demás, simple y sencillamente porque... YA HAN SIDO CARGADAS... el efecto ya fue aplicado solo que no lo viste... y ello porque dichas imagenes estan ocultas...

Recalco, lo que tu quieres es, que el efecto se aplique al "solicitar" la imagen, y no precisamente al cargarla... porque sino, solo se vería dicho efecto en la primer imagen...

Tengo o no tengo razón?? Paliza Si la tengo dime, para comenzar a integrar los dos scripts... Bailando

Saludos Muy bien

P.D. Ah que bonito es saber Fumador
Individual Perfil Privado Website
Autor Fecha: 23 de Diciembre del 2006 a las 21:46:16   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Mensajes: 344
Exacto luis, lo que quiero esque se vea al solicitarla, no al cargarla, si no solo se ve el efecto en la primera imagen como tu dices Embarazoso .

Saludos.
Individual Perfil Privado
Autor Fecha: 25 de Diciembre del 2006 a las 17:24:46   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Edad: 21 años
Ubicación: Poza Rica, Veracruz
País:
Mensajes: 1269
Bueno, te diré que hay que modificar... y aclaro que es una integración simple pero funcional... asi que tendrá que manejarse una id, pero todo irá bien... quizas se podria hacer que fuese sin id, pero es un tanto más complicado y esta muy amontonado el código, no es muy legible... pero bueno.

Antes que nada, si no has modificado tu bloque o código, y tiene los cambios que yo te he pedido, al pie de la letra... solo tendrás que enfocarte en modificar el script... de lo contrario tendrás que hacer todos los cambios que menciono, o bueno casi todos... Paliza

== Paso 1 ==

Justo después del siguiente código, que se encuentra en la línea 24:

Código
function ContentSlider&#40;sliderid, autorun&#41;&#123;

Agrega esto:

Código
initImage&#40;'1'&#41;;

Eso se encarga de darle el efecto de desvanecimiento a la primer imagen...

Alternativa:

Si el efecto no se muestra en la primera imagen, sería porque tardo en cargar e igual el efecto se aplico... entonces puedes añadir ese código solo en la primer imagen (o en todas si se te hace más sencillo, debido al bucle).

Ello quedaría de la siguiente manera:

Código
<img src="http&#58;//www.imagemozilla.com/images/74709hollywoodbash.gif" width="104" height="70"  id="1" onLoad="initImage&#40;'1'&#41;;">

== Paso 2 ==

Tienes que editar el siguiente código, que esta en la línea 45:

Código
pcontent+='<a href="#" onClick="ContentSlider.turnpage&#40;''+sliderid+'', '+i+'&#41;; return false">'+&#40;i+1&#41;+'</a> '

Y añadir el efecto de desvanecimiento... con el código:

Código
onLoad="initImage&#40;''+&#40;i+1&#41;+''&#41;;

Lo cual quedaría de la siguiente forma:

Código
pcontent+='<a href="#" onClick="ContentSlider.turnpage&#40;''+sliderid+'', '+i+'&#41;; initImage&#40;''+&#40;i+1&#41;+''&#41;; return false">'+&#40;i+1&#41;+'</a> '

== Paso 3 ==

Como te habia mencionado, las imagenes llevarán una id numerica... obligatoriamente tienen que tener un orden, comenzando por el 1... por ejemplo te quedará asi:

Código
<div id="slider1" class="contentslide">

<div class="contentdiv">
<img src="http&#58;//www.imagemozilla.com/images/74709hollywoodbash.gif" id="1">
</div>

<div class="contentdiv">
<img src="http&#58;//www.imagemozilla.com/images/249406iceslide.gif" id="2">
</div>

<div class="contentdiv">
<img src="http&#58;//www.imagemozilla.com/images/132420deadtreedefender.gif" id="3">
</div>

</div>

Si haces todo bien, funcionará y cambiará cada vez que hagas click en un número se aplicará el efecto, también se aplicará en la primer imagen... todo esta probado...

Saludos Muy bien
Individual Perfil Privado Website
Autor Fecha: 28 de Diciembre del 2006 a las 17:46:21   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Mensajes: 344
No, no me sale, te pongo los códigos:

contentslider.js:

Código
//** Featured Content Slider script- © Dynamic Drive DHTML code library &#40;http&#58;//www.dynamicdrive.com&#41;
//** Last updated&#58; Oct 28th, 06

////Ajax related settings
var csbustcachevar=0 //bust potential caching of external pages after initial Ajax request? &#40;1=yes, 0=no&#41;
var csloadstatustext="<img src='loading.gif' /> Requesting content..." //HTML to indicate Ajax page is being fetched
var csexternalfiles=&#91;&#93; //External .css or .js files to load to style the external content&#40;s&#41;, if any. Separate multiple files with comma ie&#58; &#91;"cat.css", dog.js"&#93;

////NO NEED TO EDIT BELOW////////////////////////
var enablepersist=true
var slidernodes=new Object&#40;&#41; //Object array to store references to each content slider's DIV containers &#40;<div class="contentdiv">&#41;
var csloadedobjects="" //Variable to store file names of .js/.css files already loaded &#40;if Ajax is used&#41;

function ContentSlider&#40;sliderid, autorun&#41;&#123; initImage&#40;'1'&#41;;
var slider=document.getElementById&#40;sliderid&#41;
slidernodes&#91;sliderid&#93;=&#91;&#93; //Array to store references to this content slider's DIV containers &#40;<div class="contentdiv">&#41;
ContentSlider.loadobjects&#40;csexternalfiles&#41; //Load external .js and .css files, if any
var alldivs=slider.getElementsByTagName&#40;"div"&#41;
for &#40;var i=0; i<alldivs.length; i++&#41;&#123;
if &#40;alldivs&#91;i&#93;.className=="contentdiv"&#41;&#123;
slidernodes&#91;sliderid&#93;.push&#40;alldivs&#91;i&#93;&#41; //add this DIV reference to array
if &#40;typeof alldivs&#91;i&#93;.getAttribute&#40;"rel"&#41;=="string"&#41; //If get this DIV's content via Ajax &#40;rel attr contains path to external page&#41;
ContentSlider.ajaxpage&#40;alldivs&#91;i&#93;.getAttribute&#40;"rel"&#41;, alldivs&#91;i&#93;&#41;
&#125;
&#125;
ContentSlider.buildpagination&#40;sliderid&#41;
var loadfirstcontent=true
if &#40;enablepersist && getCookie&#40;sliderid&#41;!=""&#41;&#123; //if enablepersist is true and cookie contains corresponding value for slider
var cookieval=getCookie&#40;sliderid&#41;.split&#40;"&#58;"&#41; //process cookie value &#40;&#91;sliderid, int_pagenumber &#40;div content to jump to&#41;&#93;
if &#40;document.getElementById&#40;cookieval&#91;0&#93;&#41;!=null && typeof slidernodes&#91;sliderid&#93;&#91;cookieval&#91;1&#93;&#93;!="undefined"&#41;&#123; //check cookie value for validity
ContentSlider.turnpage&#40;cookieval&#91;0&#93;, parseInt&#40;cookieval&#91;1&#93;&#41;&#41; //restore content slider's last shown DIV
loadfirstcontent=false
&#125;
&#125;
if &#40;loadfirstcontent==true&#41; //if enablepersist is false, or cookie value doesn't contain valid value for some reason &#40;ie&#58; user modified the structure of the HTML&#41;
ContentSlider.turnpage&#40;sliderid, 0&#41; //Display first DIV within slider
if &#40;typeof autorun=="number" && autorun>0&#41; //if autorun parameter &#40;int_miliseconds&#41; is defined, fire auto run sequence
window&#91;sliderid+"timer"&#93;=setTimeout&#40;function&#40;&#41;&#123;ContentSlider.autoturnpage&#40;sliderid, autorun&#41;&#125;, autorun&#41;
&#125;

ContentSlider.buildpagination=function&#40;sliderid&#41;&#123;
var paginatediv=document.getElementById&#40;"paginate-"+sliderid&#41; //reference corresponding pagination DIV for slider
var pcontent=""
for &#40;var i=0; i<slidernodes&#91;sliderid&#93;.length; i++&#41; //For each DIV within slider, generate a pagination link
pcontent+='<a href="#" onClick="ContentSlider.turnpage&#40;''+sliderid+'', '+i+'&#41;; initImage&#40;''+&#40;i+1&#41;+''&#41;; return false">'+&#40;i+1&#41;+'</a> '
pcontent+='<a href="#" style="font-weight&#58; bold;" onClick="ContentSlider.turnpage&#40;''+sliderid+'', parseInt&#40;this.getAttribute&#40;'rel'&#41;&#41;&#41;; return false">Next</a>'
paginatediv.innerHTML=pcontent
paginatediv.onclick=function&#40;&#41;&#123; //cancel auto run sequence &#40;if defined&#41; when user clicks on pagination DIV
if &#40;typeof window&#91;sliderid+"timer"&#93;!="undefined"&#41;
clearTimeout&#40;window&#91;sliderid+"timer"&#93;&#41;
&#125;
&#125;

ContentSlider.turnpage=function&#40;sliderid, thepage&#41;&#123;
var paginatelinks=document.getElementById&#40;"paginate-"+sliderid&#41;.getElementsByTagName&#40;"a"&#41; //gather pagination links
for &#40;var i=0; i<slidernodes&#91;sliderid&#93;.length; i++&#41;&#123; //For each DIV within slider
paginatelinks&#91;i&#93;.className="" //empty corresponding pagination link's class name
slidernodes&#91;sliderid&#93;&#91;i&#93;.style.display="none" //hide DIV
&#125;
paginatelinks&#91;thepage&#93;.className="selected" //for selected DIV, set corresponding pagination link's class name
slidernodes&#91;sliderid&#93;&#91;thepage&#93;.style.display="block" //show selected DIV
//Set "Next" pagination link's &#40;last link within pagination DIV&#41; "rel" attribute to the next DIV number to show
paginatelinks&#91;paginatelinks.length-1&#93;.setAttribute&#40;"rel", thenextpage=&#40;thepage<paginatelinks.length-2&#41;? thepage+1 &#58; 0&#41;
if &#40;enablepersist&#41;
setCookie&#40;sliderid, sliderid+"&#58;"+thepage&#41;
&#125;

ContentSlider.autoturnpage=function&#40;sliderid, autorunperiod&#41;&#123;
var paginatelinks=document.getElementById&#40;"paginate-"+sliderid&#41;.getElementsByTagName&#40;"a"&#41; //Get pagination links
var nextpagenumber=parseInt&#40;paginatelinks&#91;paginatelinks.length-1&#93;.getAttribute&#40;"rel"&#41;&#41; //Get page number of next DIV to show
ContentSlider.turnpage&#40;sliderid, nextpagenumber&#41; //Show that DIV
window&#91;sliderid+"timer"&#93;=setTimeout&#40;function&#40;&#41;&#123;ContentSlider.autoturnpage&#40;sliderid, autorunperiod&#41;&#125;, autorunperiod&#41;
&#125;

function getCookie&#40;Name&#41;&#123;
var re=new RegExp&#40;Name+"=&#91;^;&#93;+", "i"&#41;; //construct RE to search for target name/value pair
if &#40;document.cookie.match&#40;re&#41;&#41; //if cookie found
return document.cookie.match&#40;re&#41;&#91;0&#93;.split&#40;"="&#41;&#91;1&#93; //return its value
return ""
&#125;

function setCookie&#40;name, value&#41;&#123;
document.cookie = name+"="+value
&#125;

////////////////Ajax Related functions //////////////////////////////////

ContentSlider.ajaxpage=function&#40;url, thediv&#41;&#123;
var page_request = false
var bustcacheparameter=""
if &#40;window.XMLHttpRequest&#41; // if Mozilla, Safari etc
page_request = new XMLHttpRequest&#40;&#41;
else if &#40;window.ActiveXObject&#41;&#123; // if IE
try &#123;
page_request = new ActiveXObject&#40;"Msxml2.XMLHTTP"&#41;
&#125;
catch &#40;e&#41;&#123;
try&#123;
page_request = new ActiveXObject&#40;"Microsoft.XMLHTTP"&#41;
&#125;
catch &#40;e&#41;&#123;&#125;
&#125;
&#125;
else
return false
thediv.innerHTML=csloadstatustext
page_request.onreadystatechange=function&#40;&#41;&#123;
ContentSlider.loadpage&#40;page_request, thediv&#41;
&#125;
if &#40;csbustcachevar&#41; //if bust caching of external page
bustcacheparameter=&#40;url.indexOf&#40;"?"&#41;!=-1&#41;? "&"+new Date&#40;&#41;.getTime&#40;&#41; &#58; "?"+new Date&#40;&#41;.getTime&#40;&#41;
page_request.open&#40;'GET', url+bustcacheparameter, true&#41;
page_request.send&#40;null&#41;
&#125;

ContentSlider.loadpage=function&#40;page_request, thediv&#41;&#123;
if &#40;page_request.readyState == 4 && &#40;page_request.status==200 || window.location.href.indexOf&#40;"http"&#41;==-1&#41;&#41;
thediv.innerHTML=page_request.responseText
&#125;

ContentSlider.loadobjects=function&#40;externalfiles&#41;&#123; //function to load external .js and .css files. Parameter accepts a list of external files to load &#40;array&#41;
for &#40;var i=0; i<externalfiles.length; i++&#41;&#123;
var file=externalfiles&#91;i&#93;
var fileref=""
if &#40;csloadedobjects.indexOf&#40;file&#41;==-1&#41;&#123; //Check to see if this object has not already been added to page before proceeding
if &#40;file.indexOf&#40;".js"&#41;!=-1&#41;&#123; //If object is a js file
fileref=document.createElement&#40;'script'&#41;
fileref.setAttribute&#40;"type","text/javascript"&#41;;
fileref.setAttribute&#40;"src", file&#41;;
&#125;
else if &#40;file.indexOf&#40;".css"&#41;!=-1&#41;&#123; //If object is a css file
fileref=document.createElement&#40;"link"&#41;
fileref.setAttribute&#40;"rel", "stylesheet"&#41;;
fileref.setAttribute&#40;"type", "text/css"&#41;;
fileref.setAttribute&#40;"href", file&#41;;
&#125;
&#125;
if &#40;fileref!=""&#41;&#123;
document.getElementsByTagName&#40;"head"&#41;.item&#40;0&#41;.appendChild&#40;fileref&#41;
csloadedobjects+=file+" " //Remember this object as being already added to page
&#125;
&#125;
&#125;

Bloque:

Código
<?php

if &#40;eregi&#40;"block-NSN_Topics_Title.php", $_SERVER&#91;'PHP_SELF'&#93;&#41;&#41; &#123;
    Header&#40;"Location&#58; ../index.php"&#41;;
    die&#40;&#41;;
&#125;

global $prefix, $db;

$blkh = 10; // LINEAS
$blkw = 20; // NUMERO DE LETRAS POR LINEA&#58; 0 = TOTALIDAD DEL TITULO

$content = "<div id="slider1" class="contentslide">";

$result = $db->sql_query&#40;"select Img, id, Nomb, Descr from ".$prefix."_juegos order by id DESC limit 0, $blkh"&#41;;

for&#40;$c = 1; list&#40;$Img, $id, $Nomb, $Descr&#41; = $db->sql_fetchrow&#40;$result&#41;; $c++&#41; &#123;

    $title2 = ereg_replace&#40;"_", " ", $Nomb&#41;;
    $transfertitle = ereg_replace&#40;" ", "-", $title2&#41;;
    $title = strtr&#40;$id, " &#40;&#41;", "_&#91;&#93;"&#41;;

    if &#40;$blkw > 0 AND strlen&#40;$title2&#41; > $blkw&#41; &#123;
   $title2 = substr&#40;$title2, 0, $blkw&#41;;
    &#125;
    ?>
    <script type="text/javascript">
<!--
function initImage&#40;id&#41; &#123;
image = document.getElementById&#40;id&#41;;
setOpacity&#40;image, 0&#41;;
image.style.visibility = "visible";
fadeIn&#40;id,0&#41;;
&#125;
function fadeIn&#40;objId,opacity&#41; &#123;
if &#40;document.getElementById&#41; &#123;
obj = document.getElementById&#40;objId&#41;;
if &#40;opacity <= 100&#41; &#123;
setOpacity&#40;obj, opacity&#41;;
opacity += 10;
window.setTimeout&#40;"fadeIn&#40;'"+objId+"',"+opacity+"&#41;", 100&#41;;
&#125;
&#125;
&#125;
function setOpacity&#40;obj, opacity&#41; &#123;
opacity = &#40;opacity == 100&#41;?99.999&#58;opacity;
// IE/Win
obj.style.filter = "alpha&#40;opacity&#58;"+opacity+"&#41;";
// Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;
// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;
// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
&#125;

// -->
</script> <?php

    $content .= "<div class="contentdiv"><center><a href="juegos-flash-jugar-juego-$id-$transfertitle.html"><img id="$c" src='$Img' title="Clicka aquí para ver el juego" id="1" onLoad="initImage&#40;'$c'&#41;;"><br><a href="juegos-flash-jugar-juego-$id-$transfertitle.html">$Nomb</a><br>$Descr</center></div>";

&#125;

$content .= "</div>n";
$content .= "<div class="pagination" id="paginate-slider1"></div>n";
$content .= "<script type="text/javascript">n";
$content .= "//ContentSlider&#40;"slider_ID" , opt_miliseconds_rotate&#41;n";
$content .= "ContentSlider&#40;"slider1"&#41; //or ContentSlider&#40;"slider1", 3000&#41; to auto rotate every 3 secondsn";
$content .= "</script>n";

?>

Yo creo que he hecho todo bien, aunque si dices que todo esta probado y no me sale, obvio que en algo habré metido la pata...

Saludos.
Individual Perfil Privado
Autor Fecha: 28 de Diciembre del 2006 a las 18:39:29   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Edad: 21 años
Ubicación: Poza Rica, Veracruz
País:
Mensajes: 1269
Código
<img id="$c" src='$Img' title="Clicka aquí para ver el juego" id="1" onLoad="initImage&#40;'$c'&#41;;">

Aqui parece estar el error... tienes dos id's... y solo debe llevar una... quita id="1".

Otra cosa, ese código ha estado funcionando en IE, y muy probablemente funcionará para todos los navegadores posibles... pero no estoy seguro si el hecho de que la id, comienze con un número, te dara problemas... lo que pasa es que una id de una etiqueta no debe comenzar por un número... jajaj pero eso es otra cosa, ya veremos que pasa.

Saludos Muy bien
Individual Perfil Privado Website
Autor Fecha: 29 de Diciembre del 2006 a las 07:02:10   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Mensajes: 344
Ya está, pero la única pega que veo esque solo pasa cuando clickas en 1, 2 ,3, pero cuando clickas a Next no ocurre, ¿se podría hacer algo para que ocurriese así también?

De todas formas ya es mucho pedir.

Saludos.
Individual Perfil Privado
Autor Fecha: 29 de Diciembre del 2006 a las 12:58:45   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Edad: 21 años
Ubicación: Poza Rica, Veracruz
País:
Mensajes: 1269
Bueno, solo tienes que hacer lo siguiente...

Tomando como referencia el código anterior o el que acabas de poner... coloca justo después de la línea 63 o después del código:

Código
paginatelinks&#91;paginatelinks.length-1&#93;.setAttribute&#40;"rel", thenextpage=&#40;thepage<paginatelinks.length-2&#41;? thepage+1 &#58; 0&#41;

El siguiente código:

Código
initImage&#40;&#40;thepage<paginatelinks.length-1&#41;? thepage+1 &#58; 1&#41;;

Probado... saludos Muy bien
Individual Perfil Privado Website
Autor Fecha: 29 de Diciembre del 2006 a las 13:43:18   Descripción: Ninguna
Sin avatar
Sexo: Masculino
Mensajes: 344
Pues no me sale...
Aí quedó:

Código
paginatelinks&#91;paginatelinks.length-1&#93;.setAttribute&#40;"rel", thenextpage=&#40;thepage<paginatelinks.length-2&#41;? thepage+1 &#58; 0 initImage&#40;&#40;thepage<paginatelinks.length-1&#41;? thepage+1 &#58; 1&#41;;&#41;

Y lo he puesto también fuera, pero tampoco pasa...
Individual Perfil Privado