A little progress

I’ve got a fairly simple posting interface for my notes. A small textarea, an optional file upload, some checkboxes for syndicating to Twitter and Flickr, and a submit button.

Notes posting interface

It works fine although sometimes the experience of uploading a file isn’t great, especially if I’m on a slow connection out and about. I’ve been meaning to add some kind of Ajax-y progress type thingy for the file upload, but never quite got around to it. To be honest, I thought it would be a pain.

But then, in his excellent State Of The Gap hit parade of web technologies, Remy included a simple file upload demo. Turns out that all the goodies that have been added to XMLHttpRequest have made this kind of thing pretty easy (and I’m guessing it’ll be easier still once we have fetch).

I’ve made a little script that adds a progress bar to any forms that are POSTing data.

Feel free to use it, adapt it, and improve it. It isn’t using any ES6iness so there are some obvious candidates for improvement there.

It’s working a treat on my little posting interface. Now I can stare at a slowly-growing progress bar when I’m out and about on a slow connection.

Have you published a response to this? :



# Liked by Jan Skovgaard on Sunday, May 29th, 2016 at 8:53pm

# Liked by Oliver Joseph Ash on Sunday, May 29th, 2016 at 9:55pm

# Liked by MrMartineau on Sunday, May 29th, 2016 at 10:26pm

Previously on this day

5 years ago I wrote 100 words 068

Day sixty eight.

17 years ago I wrote Gaming for good, not evil

According to recently published research that has geeks the world over rubbing their hands with glee, playing video games may actually be quite beneficial: