<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dillon Headley</title>
    <description>The latest articles on DEV Community by Dillon Headley (@dillonheadley).</description>
    <link>https://dev.to/dillonheadley</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F147950%2F0d229c8b-f579-4468-bc38-fb8614937981.JPG</url>
      <title>DEV Community: Dillon Headley</title>
      <link>https://dev.to/dillonheadley</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dillonheadley"/>
    <language>en</language>
    <item>
      <title>HTMZ inspired form subission</title>
      <dc:creator>Dillon Headley</dc:creator>
      <pubDate>Sun, 31 Mar 2024 15:31:04 +0000</pubDate>
      <link>https://dev.to/dillonheadley/htmz-inspired-form-subission-2joe</link>
      <guid>https://dev.to/dillonheadley/htmz-inspired-form-subission-2joe</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for DEV Challenge v24.03.20, Glam Up My Markup: Camp Activities&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I was inspired by &lt;a href="https://leanrada.com/htmz/"&gt;htmz&lt;/a&gt; (which was in turn inspired by &lt;a href="https://htmx.org/"&gt;htmx&lt;/a&gt;) and how the author got pretty close to a basic htmx-like experience just using an iframe. I wanted to push it a little further so whipped this demo together. My submission demonstrates progressive enhancement for the form - with js enabled the request targets an iframe that is inserted into the dom, meaning the page doesn't actually navigate (similar to &lt;code&gt;event.preventDefault()&lt;/code&gt;). The iframe receives the html response from the request and on load triggers a function to swap out it's contents into the main page. &lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;You can find my demo here: &lt;a href="https://glam-up.netlify.app/"&gt;https://glam-up.netlify.app/&lt;/a&gt;&lt;br&gt;
And the code here: &lt;a href="https://github.com/dillonbheadley/glam-up"&gt;https://github.com/dillonbheadley/glam-up&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;I put this together pretty quickly so there are probably bugs or things I haven't dealt with or handled (like validation). For simplicity I just used Netlify's edge functions and js template literals for "components".&lt;/p&gt;

&lt;p&gt;I think you could get pretty far with this little setup for simple sites/apps with very little overhead or maintenance. It was fun to mess around with at least! I'd be happy to answer any questions.&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
