Created
December 1, 2016 05:18
-
-
Save aranajhonny/fb90ad8253c506550567138149175cc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recuperar(){ | |
var username = $('[name="username"]').val(); | |
$.ajax({ | |
url : "?controller=login&action=getpregunta&username=" + username, | |
type: "GET", | |
dataType: "JSON", | |
success: function(data) | |
{ | |
var template = ` | |
<center><label>Pregunta secreta: <i>${data}</i></label></center> | |
<div style="margin-bottom: 25px" class="input-group asd"> | |
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> | |
<input type="text" class="form-control" name="respuesta" placeholder="Respuesta secreta" required="true"> | |
</div> | |
<div style="margin-top:10px" class="form-group"> | |
<div class="col-xs-2 col-xs-offset-3 controls"> | |
<center><a id="enviar" href="#" class="btn btn-info">Enviar</a></center> | |
</div> | |
<div class="col-xs-4 col-xs-offset-1"> | |
<a class="btn btn-sucedio" href="javascript:history.go()" title="VOLVER" >Volver</a> | |
</div> | |
</div> | |
`; | |
$('.asd').remove(); | |
$('#form').html(template) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment