Foros del Web » Programando para Internet » Javascript »

Ayuda a reparar Codigo URGENTE!!!

Estas en el tema de Ayuda a reparar Codigo URGENTE!!! en el foro de Javascript en Foros del Web. Hola, Bueno despues de la ayuda que me brindaron en el post anterio quisiera que alguien me ayude a reparar el codigo del Carousel haber ...
  #1 (permalink)  
Antiguo 13/08/2009, 00:19
 
Fecha de Ingreso: diciembre-2008
Mensajes: 46
Antigüedad: 15 años, 4 meses
Puntos: 0
Exclamación Ayuda a reparar Codigo URGENTE!!!

Hola,

Bueno despues de la ayuda que me brindaron en el post anterio quisiera que alguien me ayude a reparar el codigo del Carousel haber les presento el problema:

-El Carousel no funciona

COdigo ORIGINAL CSS:

Código:
/* Horizontal Carousel */
#horizontal_carousel {
  float:left;
  width: 575px;
  height: 200px;
  margin-bottom: 10px;
  position: relative;  
}         

#horizontal_carousel .container {
  position: absolute;
  top: 5px;
  left: 37px;  
  width: 504px;
  height: 144px;
  overflow:hidden;   
  background: #3F3F3F;
}            

#horizontal_carousel .previous_button {
  position: absolute;
  top: 5px;
  left: 10px;
  width: 27px;
  height: 144px;
  background: url(classic/horizontal/left.gif);
  z-index: 100;    
  cursor:pointer;
}        

#horizontal_carousel .previous_button_disabled {
  background: url(classic/horizontal/left-disabled.gif);
  cursor:default;
}

#horizontal_carousel .next_button {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 27px;
  height: 144px;
  background: url(classic/horizontal/right.gif);
  z-index: 100;
  cursor:pointer;
}   

#horizontal_carousel .next_button_disabled {
  background: url(classic/horizontal/right-disabled.gif);
  cursor:default;
}

#horizontal_carousel ul {
  margin: 0;
  padding:0;
  width: 100000px;
  position: relative;
  top: 0;
  left: 0;
  height: 144px;
}                      

#horizontal_carousel ul li img {
  border:1px solid #999999;
  display:block;             
  background:#E3EDFA;  
}                               

#horizontal_carousel ul li {
  font-family:verdana,arial,sans-serif;
  font-size:10px;
}                               

#horizontal_carousel ul li {
  border:0px solid green;
  color:#E3EDFA;
  margin:0pt;
  padding:15px 10px 10px;
  width:106px;
  list-style:none;   
  float:left;
}
Codigo EDITADO CSS:

Código:
/* Horizontal Carousel */
#horizontal_carousel {
  position: relative; 
}         

#horizontal_carousel .container {
  position: relative;
  top: 0px;
  left: 0px;  
  width: 355px;
  height: 78px;
  overflow:hidden;
  background: url(img/H_03.gif); 
}            

#horizontal_carousel .previous_button {
  position: relative;
  top: 0px;
  left: 0px;
  width: 19px;
  height: 64px;
  background: url(img/H_13.gif);
  z-index: 100; 
  cursor:pointer;
}        

#horizontal_carousel .previous_button_disabled {
  background: url(img/H_13.gif);
  cursor:default;
}

#horizontal_carousel .next_button {
  position: relative;
  top: 0px;
  left: 0px;
  width: 19px;
  height: 64px;
  background: url(img/H_09-17.gif);
  z-index: 100; 
  cursor:pointer;
}   

#horizontal_carousel .next_button_disabled {
  background: url(img/H_09-17.gif);
  cursor:default;
}

#horizontal_carousel ul {
  margin: 0;
  padding:0;
  width: 100000px;
  position: relative;
  top: 0;
  left: 0;
  height: 144px;
}                      

#horizontal_carousel ul li img {
  border:0px solid #999999;
  display:block;             
}                               

#horizontal_carousel ul li {
  font-family:verdana,arial,sans-serif;
  font-size:10px;
}                               

#horizontal_carousel ul li {
  border:0px solid green;
  color:#E3EDFA;
  margin:0pt;
  width:106px;
  list-style:none;   
  float:left;
}
le quite en el ID(#horizontal_carousel) todo y le deje la posicion.

CODIGOS JS:

Código:
megaupload.com/?d=ZWD4H86C
disculpen por lo de MegaUpload
  #2 (permalink)  
Antiguo 13/08/2009, 00:22
 
Fecha de Ingreso: diciembre-2008
Mensajes: 46
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: Ayuda a reparar Codigo URGENTE!!!

Codigo HTML CON EL QUE NO FUNCIONA:

Código HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"hxxp://ww.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="hxxp://ww.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
	<title>Prototype UI : functional test : Carousel : Classic theme test</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Language" content="en" />
    <meta name="language" content="en" />
    <script src="prototype.js" type="text/javascript"></script>

    <script src="effects.js" type="text/javascript"></script>
    <script src="carousel.js" type="text/javascript"></script>
    <link href="classic.css" rel="stylesheet" type="text/css" />
  </head>
<body background="fondo.png" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table id="Tabla_01" width="1001" height="1041" border="0" cellpadding="0" cellspacing="0">
	<tr>

		<td colspan="29">
			<img src="img/H_01.gif" width="1000" height="106" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="106" alt=""></td>
	</tr>
	<tr>
		<td colspan="3" rowspan="12">
			<img src="img/H_02.gif" width="77" height="330" alt=""></td>
		<td colspan="23">

			<img src="img/H_03.png" width="847" height="12" alt=""></td>
		<td colspan="3" rowspan="12">
			<img src="img/H_04.gif" width="76" height="330" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="12" alt=""></td>
	</tr>
	<tr>
		<td colspan="23">
			<img src="img/H_05.gif" width="847" height="32" alt=""></td>

		<td>
			<img src="img/espacio.gif" width="1" height="32" alt=""></td>
	</tr>
	<tr>
		<td colspan="3" rowspan="2">
			<img src="img/H_06.gif" width="28" height="7" alt=""></td>
		 <td colspan="4" rowspan="4"><div id="horizontal_carousel"> <div class="container">
        <ul>

        </ul>
      </div></div></td>

		<td colspan="16">
			<img src="img/H_08.gif" width="464" height="3" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="3" alt=""></td>
	</tr>
	<tr>

		<td colspan="8">
			<img src="img/H_09.gif" width="80" height="4" alt=""></td>
		<td colspan="4" rowspan="4" background="img/H_03-1.gif">
			</td>
		<td colspan="4">
			<img src="img/H_11.gif" width="29" height="4" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="4" alt=""></td>
	</tr>

	<tr>
		<td rowspan="8">
			<img src="img/H_12.gif" width="5" height="279" alt=""></td>
		<td><div id="horizontal_carousel">
      <div class="previous_button"></div> </td> 
		<td rowspan="8">
			<img src="img/H_14.gif" width="4" height="279" alt=""></td>
		<td colspan="2" rowspan="4">
			<img src="img/H_15.gif" width="6" height="137" alt=""></td>

		<td colspan="2"><div id="horizontal_carousel"> <div class="next_button"></div></div> </td>

    </div>

		<td rowspan="8">
			<img src="img/H_17.gif" width="31" height="279" alt=""></td>
		<td colspan="2">
			<img src="img/H_11-19.gif" width="19" height="64" alt=""></td>
		<td rowspan="8">

			<img src="img/H_19.gif" width="5" height="279" alt=""></td>
		<td colspan="2" rowspan="4">
			<img src="img/H_20.gif" width="5" height="137" alt=""></td>
		<td>
			<img src="img/H_21.gif" width="19" height="64" alt=""></td>
		<td rowspan="8">
			<img src="img/H_22.gif" width="5" height="279" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="64" alt=""></td>

	</tr>
	<tr>
		<td rowspan="4">
			<img src="img/H_23.gif" width="19" height="80" alt=""></td>
		<td colspan="2" rowspan="4">
			<img src="img/H_24.gif" width="19" height="80" alt=""></td>
		<td colspan="2" rowspan="4">
			<img src="img/H_25.gif" width="19" height="80" alt=""></td>
		<td rowspan="4">

			<img src="img/H_26.gif" width="19" height="80" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="7" alt=""></td>
	</tr>
	<tr>
		<td colspan="4" rowspan="2">
			<img src="img/H_27.gif" width="355" height="66" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="3" alt=""></td>

	</tr>
	<tr>
		<td colspan="4">
			<img src="img/H_28.gif" width="355" height="63" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="63" alt=""></td>
	</tr>
	<tr>
		<td rowspan="4">

			<img src="img/H_29.gif" width="1" height="142" alt=""></td>
		<td colspan="4" rowspan="3" background="img/H_21-31.gif">
			</td>
		<td rowspan="4">
			<img src="img/H_31.gif" width="5" height="142" alt=""></td>
		<td rowspan="4">
			<img src="img/H_32.gif" width="1" height="142" alt=""></td>
		<td colspan="4" rowspan="3" background="img/H_29-34.gif">
			</td>

		<td rowspan="4">
			<img src="img/H_34.gif" width="4" height="142" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="7" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="img/H_35.gif" width="19" height="64" alt=""></td>
		<td colspan="2">

			<img src="img/H_36.gif" width="19" height="64" alt=""></td>
		<td colspan="2">
			<img src="img/H_38.gif" width="19" height="64" alt=""></td>
		<td>
			<img src="img/H_38-39.gif" width="19" height="64" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="64" alt=""></td>
	</tr>
	<tr>

		<td rowspan="2">
			<img src="img/H_39.gif" width="19" height="71" alt=""></td>
		<td colspan="2" rowspan="2">
			<img src="img/H_40.gif" width="19" height="71" alt=""></td>
		<td colspan="2" rowspan="2">
			<img src="img/H_41.gif" width="19" height="71" alt=""></td>
		<td rowspan="2">
			<img src="img/H_42.gif" width="19" height="71" alt=""></td>
		<td>

			<img src="img/espacio.gif" width="1" height="7" alt=""></td>
	</tr>
	<tr>
		<td colspan="4">
			<img src="img/H_43.gif" width="355" height="64" alt=""></td>
		<td colspan="4">
			<img src="img/H_44.gif" width="355" height="64" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="64" alt=""></td>

	</tr>
	<tr>
		<td rowspan="8">
			<img src="img/H_45.gif" width="58" height="604" alt=""></td>
		<td colspan="26" background="img/H_03-47.gif">
			</td>
		<td colspan="2" rowspan="3">
			<img src="img/H_47.gif" width="59" height="175" alt=""></td>
		<td>

			<img src="img/espacio.gif" width="1" height="90" alt=""></td>
	</tr>
	<tr>
		<td colspan="26">
			<img src="img/H_48.gif" width="883" height="54" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="54" alt=""></td>
	</tr>
	<tr>

		<td colspan="7">
			<img src="img/H_49.gif" width="292" height="31" alt=""></td>
		<td colspan="13">
			<img src="img/H_50.gif" width="301" height="31" alt=""></td>
		<td colspan="6">
			<img src="img/H_51.gif" width="290" height="31" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="31" alt=""></td>
	</tr>

	<tr>
		<td rowspan="5">
			<img src="img/H_52.gif" width="3" height="429" alt=""></td>
		<td colspan="11" rowspan="2" background="img/H_53.png">
			</td>
		<td colspan="3">
			<img src="img/H_54.gif" width="35" height="2" alt=""></td>
		<td colspan="12" rowspan="2" background="img/H_03-56.png">
			</td>

		<td rowspan="5">
			<img src="img/H_56.gif" width="58" height="429" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="2" alt=""></td>
	</tr>
	<tr>
		<td colspan="3" rowspan="2">
			<img src="img/H_57.gif" width="35" height="400" alt=""></td>
		<td>

			<img src="img/espacio.gif" width="1" height="293" alt=""></td>
	</tr>
	<tr>
		<td colspan="11">
			<img src="img/H_58.gif" width="423" height="107" alt=""></td>
		<td colspan="12">
			<img src="img/H_59.gif" width="423" height="107" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="107" alt=""></td>

	</tr>
	<tr>
		<td colspan="7" rowspan="2">
			<img src="img/H_60.gif" width="378" height="27" alt=""></td>
		<td colspan="11" background="img/H_61.gif">
			<center><script type="text/javascript" src="hxxp://widgets.amung.us/small.js"></script><script type="text/javascript">WAU_small('9l7s2eefzpkj')</script></center></td>
		<td colspan="8" rowspan="2">
			<img src="img/H_62.gif" width="380" height="27" alt=""></td>

		<td>
			<img src="img/espacio.gif" width="1" height="19" alt=""></td>
	</tr>
	<tr>
		<td colspan="11">
			<img src="img/H_63.gif" width="123" height="8" alt=""></td>
		<td>
			<img src="img/espacio.gif" width="1" height="8" alt=""></td>
	</tr>

	<tr>
	</tr>
</table>
<p style="clear: both;"></p>
<script type="text/javascript">
    // <![CDATA[
      function runTest() {
        var ul = $$("#horizontal_carousel .container ul").first();
        // Fill carousel
        var html = $R(0,31).inject("", function(html, index)  {
          return html + '<li><img alt="Image'+ index + '" src="images/image' +
            index + '.png"/>Image #' + index + "</li>";
        });
        ul.update(html);

        new UI.Carousel("horizontal_carousel");
      }
      Event.observe(window, "load", runTest);
    // ]]>
    </script>

</center>
</body>
</html> 
  #3 (permalink)  
Antiguo 13/08/2009, 00:23
 
Fecha de Ingreso: diciembre-2008
Mensajes: 46
Antigüedad: 15 años, 4 meses
Puntos: 0
Exclamación Respuesta: Ayuda a reparar Codigo URGENTE!!!

el codigo de arriba lo he recortado ya que no me permitia colocarlo todo pero lo importante esta arriba.



Codigo HTML CON EL QUE FUNCIONA:

Código HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"hxxp://ww.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="hxxp://ww.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
	<title>Prototype UI : functional test : Carousel : Classic theme test</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Language" content="en" />
    <meta name="language" content="en" />
    <script src="prototype.js" type="text/javascript"></script>

    <script src="effects.js" type="text/javascript"></script>
    <script src="carrousel.js" type="text/javascript"></script>
    <link href="classic.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <h1>Prototype UI : functional test : Carousel : Classic theme test</h1>
    <h3>Horizontal</h3>
<tr>
<td><div id="horizontal_carousel">
      <div class="previous_button"></div> </td> </tr> 
    <Tr><td><div id="horizontal_carousel"> <div class="container">
        <ul>
        </ul>
      </div></div></td> </tr>
     <td colspan="2"><div id="horizontal_carousel"> <div class="next_button"></div></div> </td>
    </div>
    <p style="clear: both;"></p>


        <script type="text/javascript">
    // <![CDATA[
      function runTest() {
        var ul = $$("#horizontal_carousel .container ul").first();
        // Fill carousel
        var html = $R(0,31).inject("", function(html, index)  {
          return html + '<li><img alt="Image'+ index + '" src="images/image' +
            index + '.png"/>'+"</li>";
        });
        ul.update(html);

        new UI.Carousel("horizontal_carousel");
      }
      Event.observe(window, "load", runTest);
    // ]]>
    </script>

  </body>
</html> 
NOTA: Arriba en el codigo coloque hxxp y ww. ya que no me dejaba colocar urls por la proteccion anti-spam.

Mi Ipotesis del problema:

bueno pienso que el problema puede ser porque cambie la posicion de los botones con esto quiero decir que el boton "ANTERIOR" lo coloque despues del "CONTAINER" y por esta razon no funciona (ES UNA IPOTESIS) ahora mi pregunta es si mi ipotesis es cierta, de que forma puedo hacer que funcione de la forma que esta ya que photoshop me genero los archivos asi y si muevo la "TD" hacia arriba se dana todo el diseno. alguien que me ayude (PORFAVOR coloquen el CODIGO de como quedaria me seria de mas ayuda).

Muchas Gracias,

Espero alguien me pueda ayudar,

Bye
  #4 (permalink)  
Antiguo 13/08/2009, 06:33
 
Fecha de Ingreso: diciembre-2008
Mensajes: 46
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: Ayuda a reparar Codigo URGENTE!!!

No hay nadie que me pueda ayudar :(?
  #5 (permalink)  
Antiguo 18/08/2009, 18:58
Avatar de goyo_  
Fecha de Ingreso: agosto-2009
Mensajes: 91
Antigüedad: 14 años, 8 meses
Puntos: 1
Respuesta: Ayuda a reparar Codigo URGENTE!!!

Cita:
Iniciado por Serialk89 Ver Mensaje
Gracias a mi tambien me sirvio
A ti todo te sirve
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:41.