Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/10/2012, 05:39
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: detener ejecucion de ancla según resultado de validacion

Cita:
Iniciado por i34a23 Ver Mensaje
Sigue ejecutando el ancla :(
En realidad la ejecución de un confirm, implica un return false; en su cancelación
Su uso básico sería:
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. <!--
  8. function borraRegistro() {
  9.     var pregunta = confirm("borrar?")
  10.     if(pregunta){
  11.         // función para borrar
  12.         alert("borrado");
  13.         window.location.href = "#marcador";
  14.        
  15.     }else{
  16.     alert("acción cancelada")
  17.     }
  18. }
  19. //-->
  20. </head>
  21. <p>
  22. <button onclick="borraRegistro();">Borrar</button>
  23. </p>
  24. <div id="marcador" style="margin-top: 1000px;">
  25. marcador
  26. </div>
  27. </body>
  28. </html>

SAludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.