Created
June 23, 2015 23:46
-
-
Save someoneigna/52e7569b8f40990e8577 to your computer and use it in GitHub Desktop.
Rellenador encuestas UTN
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
var encuesta = document.getElementById('fillencuesta'); | |
var preguntas = encuesta.getElementsByClassName('rd-enc'); | |
var campos = encuesta.getElementsByTagName('textarea'); | |
for(index = 0; index < preguntas.length; index+= 3) | |
{ | |
var siempre = preguntas[index]; | |
var aveces = preguntas[index+1]; | |
var nunca = preguntas[index+2]; | |
siempre.checked = true; // elegir una de las tres opciones | |
} | |
var mensaje_campo = "Encuesta autocompletada con FillEncuestaUTN0.1"; | |
for(index = 0; index < campos.length; index++) | |
{ | |
campos[index].value = mensaje_campo; | |
} | |
encuesta.submit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment