Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/03/2011, 11:34
andruxand
 
Fecha de Ingreso: marzo-2010
Ubicación: Cali
Mensajes: 203
Antigüedad: 14 años, 10 meses
Puntos: 5
Respuesta: Ayuda con Ajax.PeriodicalUpdater

mira aqui esta:

Código Javascript:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  5. <title>Create a Custom Content Slider with jQuery</title>
  6.  
  7.       <script type="text/javascript" src="../js/prototype.js"></script>
  8.       <script type="text/javascript">
  9.       var updater = function(target, url, params) {
  10.           return new Ajax.PeriodicalUpdater(target, url, params || {
  11.               method: 'get', frequency: 1, decay: 2
  12.           });
  13.       }
  14.       document.observe('dom:loaded', function() {      
  15.           $('btn1').observe('click', function(e){                              
  16.               e.stop();
  17.               this.stopObserving('click');                            
  18.               updater('contenido', 'alertas.php');                
  19.           });            
  20.           $('btn2').observe('click', function(e){                              
  21.               e.stop();
  22.               this.stopObserving('click');                            
  23.               updater('contenido', 'alertas_com.php');                
  24.           });
  25.       });
  26.       </script>
  27. </head>
  28.       <body style="padding-top:1%;">
  29.       <div id="hero-slider" >
  30.         <form name="form1"><table width="160" border="0" align="center">
  31.           <tr>
  32.             <td width="75" height="96">
  33.       <input type="button" id="btn1" class="boton2" name="Submit" value="" />
  34.               <div class="Estilo3" style="position:relative; bottom:10%; width: 75px;">
  35.                 <div align="center">Radicacion</div>
  36.             </div></td>
  37.             <td width="75" height="96">
  38.       <input type="button" id="btn2" class="boton2" name="Submit2" value="" />
  39.       <div class="Estilo5" style="position:relative; bottom:10%; width:75" >
  40.           <div align="center">Licencia</div>
  41.         </div></td>
  42.           </tr>
  43.         </table></form>
  44.  
  45.         <div id="contenido" align="center" style="padding-top:2%">
  46.       <div id="precarga" align="center"></div>
  47.         </div>
  48.               <!-- .mask -->
  49.       </div> <!-- #hero-slider -->
  50.       </body>
  51. </html>