Guest User

Untitled

a guest
Jan 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title></title>
  4.  
  5. <link rel="stylesheet" href="css/lateral.css">
  6. <link rel="stylesheet" href="css/bootstrap.min.css">
  7. <script src="js/bootstrap.min.js"> </script>
  8.  
  9. <script type="text/javascript">
  10.  
  11.  
  12. function showUser(asig,uni,cur,cua,car) {
  13.  
  14. window.alert("entro");
  15. window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
  16. if (asig == "" ) {
  17.  
  18. window.alert("Sum shit");
  19. window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
  20.  
  21. return;
  22. } else {
  23. if (window.XMLHttpRequest) {
  24. // code for IE7+, Firefox, Chrome, Opera, Safari
  25. xmlhttp = new XMLHttpRequest();
  26. } else {
  27. // code for IE6, IE5
  28. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  29. }
  30.  
  31.  
  32. xmlhttp.open("GET","/insertar_a?asig="+asig+"&uni="+uni+"&cur="+cur+"&cua="+cua+"&car="+car,true);
  33.  
  34. xmlhttp.onreadystatechange = function() {
  35. if (this.readyState == 4 && this.status == 200) {
  36.  
  37. document.getElementById("boi").innerHTML = this.responseText;
  38. window.alert("sum shit2");
  39. window.alert(asig+" "+uni+""+cur+""+cua+""+car+"");
  40.  
  41. }
  42. };
  43.  
  44. xmlhttp.send();
  45.  
  46.  
  47.  
  48. }
  49. }
  50.  
  51. </script>
  52. </head>
  53. <body>
  54. <div id="boi">
  55. <form>
  56. <div class="form-group" style="width: 600px;">
  57. <label for="exampleInputEmail1">Inserte Asignatura</label>
  58. <input id="asignatura" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Asignatura">
  59.  
  60. </div>
  61. <div class="form-group" style="width: 600px;">
  62. <label for="exampleInputEmail1">Inserte Universidad</label>
  63. <input id="Universidad" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Universidad">
  64.  
  65. </div>
  66. <div class="form-group" style="width: 600px;">
  67. <label for="exampleInputEmail1">Inserte Carrera</label>
  68. <input id="Carrera" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Carrera">
  69.  
  70. </div>
  71. <div class="form-group" style="width: 100px;">
  72. <label for="exampleInputEmail1">Inserte Curso</label>
  73. <input id="Curso" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" >
  74.  
  75. </div>
  76. <div class="form-group" style="width: 150px;">
  77. <label for="exampleInputEmail1">Inserte cuatrimestre</label>
  78. <input id="cuatrimestre" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" >
  79.  
  80. </div>
  81. <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>
  82. </form>
  83.  
  84. </div>
  85.  
  86.  
  87.  
  88. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  89. <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>
  90. </body>
  91. </html>
Add Comment
Please, Sign In to add comment