Skip to content
Snippets Groups Projects
Commit 5cdb61a7 authored by Fnac's avatar Fnac
Browse files

Script para confirmar borrar, no funciona

parent 7caf4b8e
Branches
No related tags found
No related merge requests found
...@@ -40,3 +40,20 @@ function pswigual(){ ...@@ -40,3 +40,20 @@ function pswigual(){
} }
} }
function confirmarBorarNook(){
confirm("mensaje");
var mensaje;
var opcion = confirm("Clicka en Aceptar o Cancelar");
if (opcion == true) {
mensaje = "Has clickado OK";
} else {
mensaje = "Has clickado Cancelar";
}
document.getElementById("borrar").innerHTML = mensaje;
}
\ No newline at end of file
...@@ -13,6 +13,10 @@ and open the template in the editor. ...@@ -13,6 +13,10 @@ and open the template in the editor.
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet"> <link href="style.css" rel="stylesheet">
<script type='text/javascript' src='js/miscripts.js'></script>
<script>
confirmarBorrarNook();
</script>
</head> </head>
<body > <body >
<% <%
...@@ -87,7 +91,7 @@ and open the template in the editor. ...@@ -87,7 +91,7 @@ and open the template in the editor.
</form> </form>
</div> </div>
<div class="nooks"> <div class="nooks">
<button type="submit" class="borrarNook" onclick="window.location.href='borrarNookSV?idNook=<%=misNooks.get(i).getIdNook()%>'">Borrar Nook</button> <button id="borrar" type="submit" class="borrarNook" onclick="window.location.href='borrarNookSV?idNook=<%=misNooks.get(i).getIdNook()%>'" onSubmit="return confirmarBorrarNook()"s>Borrar Nook</button>
</div> </div>
</div> </div>
<%}%> <%}%>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment