Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
Ocultar el bloque div en html al cargar la plantilla de giro mecánico de Amazon

Quiero enviar un trabajo a Amazon Mechanical Turk para que me ayude a anotar algunos datos.

Tengo un consentimiento de ética de investigación que debo mostrar a los trabajadores al principio antes de que comiencen sus trabajos.

Mi archivo csv se parece a:

 variable2,consent ,This is the consent text1, text2, text3,

Código HTML:

 <!-- You must include this JavaScript file --> <script src="https://assets.crowd.aws/crowd-html-elements.js"></script> <script type="text/javascript"> function show_hide_data() { var co = new String(${consent}); if(co.length > 2){ document.getElementById('con_').style.display ='block'; document.getElementById('data_').style.display ='none'; } else{ document.getElementById('con_').style.display ='none'; document.getElementById('data_').style.display ='block'; } } </script> <body onload="javascript:show_hide_data()"> <!-- You must include crowd-form so that your task submits answers to MTurk --> <crowd-form answer-format="flatten-objects"> <div id="con_"> <p> Consent: ${consent}</p> </div> <div id="data_"> <p> Text: ${variable2}</p> </div> </crowd-form> </body>

Mi idea es, usando javascript, quiero mostrar el con_ div y ocultar data_ div cuando hay un texto de consent en el csv (primera línea), y viceversa.

El código funciona bien localmente, pero parece que la parte de javascript no funciona cuando lo pruebo en el sitio web.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!