Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title></title>
- <link rel="stylesheet" href="css/lateral.css">
- <link rel="stylesheet" href="css/bootstrap.min.css">
- <script src="js/bootstrap.min.js"> </script>
- <script type="text/javascript">
- function showUser(asig,uni,cur,cua,car) {
- window.alert("entro");
- window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
- if (asig == "" ) {
- window.alert("Sum shit");
- window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
- return;
- } else {
- if (window.XMLHttpRequest) {
- // code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp = new XMLHttpRequest();
- } else {
- // code for IE6, IE5
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.open("GET","/insertar_a?asig="+asig+"&uni="+uni+"&cur="+cur+"&cua="+cua+"&car="+car,true);
- xmlhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- document.getElementById("boi").innerHTML = this.responseText;
- window.alert("sum shit2");
- window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
- }
- };
- xmlhttp.send();
- }
- }
- </script>
- </head>
- <body>
- <div id="boi">
- <form>
- <div class="form-group" style="width: 600px;">
- <label for="exampleInputEmail1">Inserte Asignatura</label>
- <input id="asignatura" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Asignatura">
- </div>
- <div class="form-group" style="width: 600px;">
- <label for="exampleInputEmail1">Inserte Universidad</label>
- <input id="Universidad" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Universidad">
- </div>
- <div class="form-group" style="width: 600px;">
- <label for="exampleInputEmail1">Inserte Carrera</label>
- <input id="Carrera" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Carrera">
- </div>
- <div class="form-group" style="width: 100px;">
- <label for="exampleInputEmail1">Inserte Curso</label>
- <input id="Curso" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" >
- </div>
- <div class="form-group" style="width: 150px;">
- <label for="exampleInputEmail1">Inserte cuatrimestre</label>
- <input id="cuatrimestre" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" >
- </div>
- <button type="submit" class="btn btn-primary" onclick="showUser(document.getElementById('asignatura').value,document.getElementById('Universidad').value,document.getElementById('Curso').value,document.getElementById('cuatrimestre').value,document.getElementById('Carrera').value)">Submit</button>
- </form>
- </div>
- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment