Go offline with the Player FM app!
The basics: hx-vals
Manage episode 398717790 series 3550795
How do you feel about setting your request values right there inline?
STATIC
hx-trigger="click"
hx-vals='{"location": "01245"}'>
Click for weather in one static location
DYNAMIC
hx-trigger="click"
hx-vals='js:{location: document.getElementById("zipcode").value}'>
Click for weather in one static location
OR
hx-trigger="click"
hx-vals='js:{location: someJavascriptCalculationFunction()}'>
Click for weather in one static location
67 episodes
Manage episode 398717790 series 3550795
How do you feel about setting your request values right there inline?
STATIC
hx-trigger="click"
hx-vals='{"location": "01245"}'>
Click for weather in one static location
DYNAMIC
hx-trigger="click"
hx-vals='js:{location: document.getElementById("zipcode").value}'>
Click for weather in one static location
OR
hx-trigger="click"
hx-vals='js:{location: someJavascriptCalculationFunction()}'>
Click for weather in one static location
67 episodes
All episodes
×Welcome to Player FM!
Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.