Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/08/2010, 10:39
Avatar de wiltoncb
wiltoncb
 
Fecha de Ingreso: abril-2010
Ubicación: villavicencio Colombia
Mensajes: 51
Antigüedad: 14 años
Puntos: 0
Respuesta: codigo javascript siempre activo

LISTO YA LO AREGLE PERO FUE GRACIAS A LO QUE USTED LE AGREGO
(windows.onload = irA('nombre_id');). PARA QUE FUNCIONE LE HICE ESTE CAMBIO QUEDÓ ASÍ:
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. window.onload = function (){
  3.    var offsetTrail = document.getElementById('nombre_id');
  4.    var offsetLeft = 0;
  5.    var offsetTop = 0;
  6.  
  7.    while (offsetTrail) {
  8.       offsetLeft += offsetTrail.offsetLeft;
  9.       offsetTop += offsetTrail.offsetTop;
  10.       offsetTrail = offsetTrail.offsetParent;
  11.    }
  12.  
  13.    if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined" && navigator.appName=="Microsoft Internet Explorer" ) {
  14.       offsetLeft += parseInt(document.body.leftMargin);
  15.       offsetTop += parseInt(document.body.topMargin);
  16.    }
  17.    window.scrollTo(offsetLeft,offsetTop);
  18.  
  19.    
  20. }
  21. </script>