Meyerweb, (edited )
@Meyerweb@mastodon.social avatar

Here’s a question: suppose I have bunch of HTML inputs (dropdowns, sliders, whatever), and I want their values to set the values of #JS variables, both on load and whenever changed. Is there a way to do that in a generic manner short of dumping all the variables into an object so I can use their member names using array-ish syntax, or pushing everything through an eval()? [shudder]

**Edited to add: **I don’t think I got the idea across, so here’s something tangible: https://codepen.io/meyerweb/pen/GRLyZWY

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • ethstaker
  • Youngstown
  • everett
  • slotface
  • osvaldo12
  • rosin
  • mdbf
  • kavyap
  • thenastyranch
  • ngwrru68w68
  • provamag3
  • Durango
  • modclub
  • cubers
  • khanakhh
  • Leos
  • tacticalgear
  • cisconetworking
  • vwfavf
  • tester
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines