PseudoForm, a Bot-resistant Web Form

I would like to create an HTML form that is resistant to bots. This could be a classic comment form or really any web-accessible form. In most cases, requiring authentication and an authorization service (such as OAuth) would be sufficient to protect a back-end web service. But what if you have a publicly accessible web […]

HTML + CSS + JavaScript Lessons

I would like a very simple introduction to web development, from the basics of HTML and CSS, to the proper use of JavaScript; and all without getting bogged down in complicated textbooks. I’ve been working with HTML, CSS, and JavaScript (as well as dozens of programming languages in more environments than I can remember) for […]

node.js redirect with query string

Previously, I discussed javascript appending to query string, where we serialized an associative array to a query string. I would now like to leverage this technique within node.js as a redirect service. Specifically, I am using express to make a web app in node.js and the app includes a redirect service, e.g., var app = […]

javascript appending to query string

I would like to append an associative array to a URL’s query string. For whatever reason, there is no native javascript method to accomplish this task. This needs to be done manually or using a common web framework such as jQuery. The first step is to serialize the associative array into a query string, native […]

scripting Photoshop for stop motion

I would like a simple and quick way to save a copy of an image in Photoshop, with an auto-incrementing filename. Ideally, a single button to capture a frame in a stop motion animation. In other words, I would like to save a copy of the working image as a JPEG without any interactive prompts […]

HTML5 canvas Mandelbrot

I would like to create an animated Mandelbrot visualization using JavaScript on an HTML5 <canvas> element. The Mandelbrot set, popularized by BenoĆ®t Mandelbrot, is the set of complex numbers that remain bounded under the function zn+1 = zn2 + c. This is known as an escape function; that is, regardless of the size of n, […]

javascript keyboard buffer, part 4

Previously, we created a JavaScript keyboard buffer that can edit text in a static html page as well as play back each key as it was typed. I would like to combine all of this into a single JavaScript include called keylogger.js, and rather than specify each div that I want to edit I’d like […]

javascript keyboard buffer, part 3

Previously, we created a javascript keyboard buffer that can edit text in a static html page. Using those functions I’d like to add a buffer replay. I would like to add an onclick event to a specified div such that it will activate the keyboard buffer and leverage the previously discussed handleKey() event handler, as […]

javascript keyboard buffer, part 2

Previously, we created a javascript keyboard buffer and next I’d like to process that buffer to edit text in a static html page. Given the following simple html: <div id=”keyboardBufferTest”> Spam and eggs </div> I would like the keyboard buffer to modify the text inside that div element. The following JavaScript function will read the […]

javascript keyboard buffer, part 1

I would like to capture keystrokes in JavaScript, save them to a buffer, and play them back exactly as they were typed. There are three onkey events that can be assigned event handlers, these are, document.onkeydown = eventHandler document.onkeypress = eventHandler document.onkeyup = eventHandler When one of these events is triggered, the unicode representation of […]

javascript prototype

I would to extend the functionality of a JavaScript class, for example, to add utility functions to a specific Object. Object.prototype The prototype property can be used to add new properties and functions to any object, including built-in objects. For example, you could extend an Array as follows: // // extend Array objects, test if […]

css opacity in javascript

I want register JavaScript events to toggle CSS opacity on selectable images. For example, given a div with a list of images like the following, <div id="foo_images"> <img src="foo.jpg" /> <img src="bar.jpg" /> <img src="baz.jpg" /> … </div> I would like these images to be 50% transparent but 80% visible during a mouseover. I would […]