Overriding setInterval with a better implementation

JavaScript includes two built-in options for timing and delaying actions, setInterval() and setTimeout(). These functions have been around since before the first ECMA specifications, so their implementations across browsers are largely non-standardized and inconsistent. I’ve noticed some problems with setInterval(), particularly when it’s left in a background tab. See the issues and how to solve them

Tagged with: ,
Posted in Custom Library Functions, GitHub, JavaScript

Self-hosted moderated chat room and liveblog project

A few months ago I contacted Brian Cook, proprietor of one of the best sports blogs on the Internet, MGoBlog. A year or so earlier I had created a userscript that improved some functionality for his site, and I thought he might be interested in building some of that JS directly into the site so it would benefit every user. Instead we ended up discussing a few other projects, including an open-source alternative for the relatively expensive moderated liveblog systems the site uses for Michigan football gamedays. These are the results of that project so far. See the project

Tagged with: , , , , ,
Posted in GitHub, HTML & CSS, JavaScript, jQuery, MySQL, PHP, Server Side Code

Graceful degradation of jQuery event handlers

If you saw my post on SharePoint custom ribbon actions, you may have noticed the section where I had to lay out several options for jQuery’s persistent event handlers because I couldn’t know which version of jQuery the solution would be used with. Since I’ve written a few projects that are designed to be inserted into existing sites, I thought it would be a good idea to build a system to easily manage the graceful degradation of these handlers. How I did it

Tagged with:
Posted in Custom Library Functions, GitHub, JavaScript, jQuery

Using an Ajax powered web form to update a database

As part of the preparation for my upcoming wedding to a wonderful lady, I’m in charge of building our wedding website, which we’ve decided will handle all of our RSVPs. I’m still in the process of building the RSVP form for that site, maybe I’ll do a full post about it and all its features once it’s done. But this process did give me an idea to build a more universal and flexible web form, which could easily be plugged into any LAMP environment and used to push form responses to a database using Ajax. How I did it

Tagged with: , , ,
Posted in GitHub, HTML & CSS, JavaScript, MySQL, PHP, Server Side Code