jeudi 4 juin 2020

Selecting Multiple Options, Then Submitting

This is more of a conceptual question than a specific question about code. As a relative novice to using javascript to create webpages, I've run into a dilemma:

  • I'm making a website for teachers (am a teacher) that tracks participation for students.
  • A pop-up appears -- all of the student's names are listed.
  • Any name that is clicked on gets switched to the selected state ... I'm just switching around CSS classes to make the name buttons look "clicked" or not.

What's the best way to get all of the names that need data attributed to them submitted through? Do I make a submit button that reads all of it when clicked, do I add data as soon as a name is clicked, or is it something else? I've tried it a few different ways and keep hitting roadblocks. Thoughts?




Aucun commentaire:

Enregistrer un commentaire