Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/04/2013, 20:42
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Recargar web si hash vacío

Si, ya lo noté, al abrir por primera vez no funciona bien en FF, hacelo asi
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. //<![CDATA[
  8. window.onload= function(){
  9. if(!location.hash){
  10. window.location.href = "#marcador";
  11. }
  12. }
  13. //]]>
  14. </head>
  15. <div style="height: 900px;">contenido A</div>
  16. <div id="marcador" style="background: red;">marcador</div>
  17. </body>
  18. </html>
Así te asegurás que el objeto window carga completamente
A mi me funcionó bien
Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.

Última edición por emprear; 08/04/2013 a las 12:06