Changes for page Survey #1 on the use of HBP Tools
Last modified by marissadiazpier on 2023/09/04 17:22
From version 12.1
edited by marissadiazpier
on 2023/06/25 23:47
on 2023/06/25 23:47
Change comment:
There is no comment for this version
To version 9.1
edited by marissadiazpier
on 2023/06/25 18:08
on 2023/06/25 18:08
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,2 +1,79 @@ 1 -(% style="margin-left:auto; margin-right:auto" %) 2 -|{{html}}<iframe width="100%" height="874" frameborder="0" src="https://observablehq.com/embed/9f70593fe5b0e763@423?cells=chart&api_key=ffdf287bb96c774d8bba9e393f0d0432c46a633a"></iframe>{{/html}}|{{html}}<iframe width="640px" height="480px" src="https://forms.office.com/Pages/ResponsePage.aspx?id=ECkoX28XnUWrfbdEqm78B0mFj_24d5tMv6n4LjCtl_RURFhLU0cyUlc1WlpCSjlISjFRQ1BPT1o2Vy4u&embed=true" frameborder="0" marginwidth="0" marginheight="0" style="border: none; max-width:100%; max-height:100vh" allowfullscreen webkitallowfullscreen mozallowfullscreen msallowfullscreen> </iframe>{{/html}} 1 +{{html}} 2 +<!DOCTYPE html> 3 +<html> 4 +<head> 5 + <title>Encuesta</title> 6 + <script src="https://api.onlyoffice.com/editors/callback.js"></script> 7 + <style> 8 + /* Estilos CSS para la encuesta */ 9 + .container { 10 + width: 400px; 11 + margin: 50px auto; 12 + } 13 + 14 + h1 { 15 + text-align: center; 16 + } 17 + 18 + form { 19 + margin-top: 20px; 20 + } 21 + 22 + label { 23 + display: block; 24 + margin-bottom: 10px; 25 + font-weight: bold; 26 + } 27 + 28 + input[type="radio"] { 29 + margin-right: 5px; 30 + } 31 + 32 + input[type="submit"] { 33 + margin-top: 10px; 34 + } 35 + </style> 36 +</head> 37 +<body> 38 + <div class="container"> 39 + <h1>Encuesta</h1> 40 + <form id="survey-form"> 41 + <label> 42 + <input type="radio" name="option" value="option1"> Opción 1 43 + </label> 44 + <label> 45 + <input type="radio" name="option" value="option2"> Opción 2 46 + </label> 47 + <label> 48 + <input type="radio" name="option" value="option3"> Opción 3 49 + </label> 50 + <input type="submit" value="Enviar"> 51 + </form> 52 + </div> 53 + 54 + <script> 55 + document.getElementById('survey-form').addEventListener('submit', function(event) { 56 + event.preventDefault(); 57 + 58 + var selectedOption = document.querySelector('input[name="option"]:checked').value; 59 + var results = "Has seleccionado: " + selectedOption; 60 + 61 + // Realizar una solicitud AJAX al servidor para guardar los datos en el archivo en la nube 62 + $.ajax({ 63 + url: 'https://drive.ebrains.eu/smart-link/2052546c-45e8-4d51-847a-fa421a62e57b/', // Reemplaza con la ruta y nombre de tu archivo en la nube 64 + type: 'POST', 65 + data: results, 66 + success: function(response) { 67 + alert('Datos guardados exitosamente en el archivo en la nube.'); 68 + }, 69 + error: function(xhr, status, error) { 70 + console.error(error); 71 + alert('Error al guardar los datos en el archivo en la nube.'); 72 + } 73 + }); 74 + }); 75 + </script> 76 +</body> 77 +</html> 78 + 79 +{{/html}}