Posts Categorized: JavaScript

Event-driven programming in the browser

On the front end we use events every day but without jQuery many of these wouldn’t exist. DOM Ready has only recently become a real browser event, before that libraries like jQuery and Prototype created and fired it for us. DOM Ready was a custom event and the functionality for creating custom events exists for… Read more »

Beware of getScript callbacks when document.write and eval get involved

Update, 10/11/11: Since I first wrote this post several excellent script loaders have been released, notably YepNope.js and the defer and async attributes have made it into the webkit builds so the problems described above will become easier to cause! Event driven programming can work around this problem and maintain the structure of your files…. Read more »

Drag and Drop – ARIA and the keyboard

Quick link for your delectation on adding ARIA events to the native drag and drop in HTML5. Not very interesting in itself but the keyboard bit was a bit better. The recommendation in the HTML5 spec is the keyboard drag and drop works as copy and paste. Tab to the element, copy it, tabbing then… Read more »

Google Map

Background. Google Maps has a really well documented API, and the maps are really cool. I wanted to see quite how easy it all was. Google Maps API. The solution I’ve created uses the API to display and customise a map, adding markers and descriptive text. It uses the marker manager to control which markers… Read more »

AJAX form submission

Background. My only previous publicly available element of AJAX scripting was the Flickr feed on the frontpage of this site. It’s really simple, just returning the results of a PHP script. To demonstrate I know more than that I’ve taken things a little further and created a contact form. AJAX POST. The present script is… Read more »